LibWeb: Define bounding rect for AddMask display list item

This allows display list player to skip masks that would not be visible.
This commit is contained in:
Aliaksandr Kalenik 2024-08-06 22:30:15 +03:00 committed by Andreas Kling
commit 672ff7e45e
Notes: github-actions[bot] 2024-08-06 20:17:00 +00:00

View file

@ -353,6 +353,8 @@ struct AddMask {
RefPtr<DisplayList> display_list; RefPtr<DisplayList> display_list;
Gfx::IntRect rect; Gfx::IntRect rect;
[[nodiscard]] Gfx::IntRect bounding_rect() const { return rect; }
void translate_by(Gfx::IntPoint const& offset) void translate_by(Gfx::IntPoint const& offset)
{ {
rect.translate_by(offset); rect.translate_by(offset);