mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Do not allocate mask bitmap for CSS "clip-path" property
Instead, it could be applied directly as a clip path in Skia painter. As a side bonus, we get rid of some DeprecatedPath and AntiAliasingPainter usage.
This commit is contained in:
parent
2dbf846ff8
commit
bc20e3ac6c
Notes:
github-actions[bot]
2024-08-20 18:01:47 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: bc20e3ac6c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1143
10 changed files with 25 additions and 32 deletions
|
@ -5,12 +5,13 @@
|
|||
*/
|
||||
|
||||
#include "BasicShapeStyleValue.h"
|
||||
#include <LibGfx/Path.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
Gfx::DeprecatedPath Polygon::to_path(CSSPixelRect reference_box, Layout::Node const& node) const
|
||||
Gfx::Path Polygon::to_path(CSSPixelRect reference_box, Layout::Node const& node) const
|
||||
{
|
||||
Gfx::DeprecatedPath path;
|
||||
Gfx::Path path;
|
||||
bool first = true;
|
||||
for (auto const& point : points) {
|
||||
Gfx::FloatPoint resolved_point {
|
||||
|
@ -44,7 +45,7 @@ String Polygon::to_string() const
|
|||
|
||||
BasicShapeStyleValue::~BasicShapeStyleValue() = default;
|
||||
|
||||
Gfx::DeprecatedPath BasicShapeStyleValue::to_path(CSSPixelRect reference_box, Layout::Node const& node) const
|
||||
Gfx::Path BasicShapeStyleValue::to_path(CSSPixelRect reference_box, Layout::Node const& node) const
|
||||
{
|
||||
return m_basic_shape.visit([&](auto const& shape) {
|
||||
return shape.to_path(reference_box, node);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue