mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibWeb: Implement rejection by bounding box for PaintInnerBoxShadow
Before this change we were painting inner shadows lying outside of viewport. Improves painting performance on Github and Twitter where this command is used a lot.
This commit is contained in:
parent
1c8d37d528
commit
9be5867eb2
Notes:
sideshowbarker
2024-07-16 23:03:06 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 9be5867eb2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/98
2 changed files with 6 additions and 0 deletions
|
@ -20,6 +20,11 @@ Gfx::IntRect PaintOuterBoxShadow::bounding_rect() const
|
|||
return get_outer_box_shadow_bounding_rect(box_shadow_params);
|
||||
}
|
||||
|
||||
Gfx::IntRect PaintInnerBoxShadow::bounding_rect() const
|
||||
{
|
||||
return box_shadow_params.device_content_rect;
|
||||
}
|
||||
|
||||
void PaintOuterBoxShadow::translate_by(Gfx::IntPoint const& offset)
|
||||
{
|
||||
box_shadow_params.device_content_rect.translate_by(offset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue