mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 11:37:45 +00:00
LibWeb/Painting: Do not paint box outer shadows not visible in viewport
This change separates the box outer shadow metrics calculations into a separate function. This function is then used to obtain the shadow bounding rectangle and skip painting if the entire shadow is outside of the viewport.
This commit is contained in:
parent
596bc76b7a
commit
99217bf6db
3 changed files with 192 additions and 40 deletions
|
@ -14,9 +14,11 @@
|
|||
|
||||
namespace Web::Painting {
|
||||
|
||||
void paint_outer_box_shadow(Gfx::Painter&, PaintOuterBoxShadowParams params);
|
||||
void paint_inner_box_shadow(Gfx::Painter&, PaintOuterBoxShadowParams params);
|
||||
|
||||
Gfx::IntRect get_outer_box_shadow_bounding_rect(PaintOuterBoxShadowParams params);
|
||||
void paint_outer_box_shadow(Gfx::Painter& painter, PaintOuterBoxShadowParams params);
|
||||
|
||||
void paint_box_shadow(
|
||||
PaintContext&,
|
||||
CSSPixelRect const& bordered_content_rect,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue