1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:47:34 +00:00

LibWeb/Painting: Do not paint paths not visible in viewport

Painting optimization to do less unnecessary work
This commit is contained in:
Aliaksandr Kalenik 2023-10-18 16:27:46 +02:00 committed by Andreas Kling
parent 708574d373
commit 3fb2b008a2
2 changed files with 20 additions and 0 deletions

View file

@ -194,6 +194,7 @@ struct FillRectWithRoundedCorners {
};
struct FillPathUsingColor {
Gfx::IntRect bounding_rect;
Gfx::Path path;
Color color;
Gfx::Painter::WindingRule winding_rule;
@ -203,6 +204,7 @@ struct FillPathUsingColor {
};
struct FillPathUsingPaintStyle {
Gfx::IntRect bounding_rect;
Gfx::Path path;
NonnullRefPtr<Gfx::PaintStyle> paint_style;
Gfx::Painter::WindingRule winding_rule;
@ -213,6 +215,7 @@ struct FillPathUsingPaintStyle {
};
struct StrokePathUsingColor {
Gfx::IntRect bounding_rect;
Gfx::Path path;
Color color;
float thickness;
@ -222,6 +225,7 @@ struct StrokePathUsingColor {
};
struct StrokePathUsingPaintStyle {
Gfx::IntRect bounding_rect;
Gfx::Path path;
NonnullRefPtr<Gfx::PaintStyle> paint_style;
float thickness;