mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 09:18:11 +00:00
LibWeb: Record painting commands in coordinates of stacking context
By storing painting command coordinates relative to the nearest stacking context we can get rid of the Translate command. Additionally, this allows us to easily check if the bounding rectangles of the commands cover or intersect within a stacking context. This should be useful if we decide to optimize by avoiding the execution of commands that will be overpainted by the results of subsequent commands.
This commit is contained in:
parent
311cc7d9b9
commit
4318bcf447
6 changed files with 76 additions and 68 deletions
|
@ -343,8 +343,8 @@ void StackingContext::paint(PaintContext& context) const
|
|||
paint_internal(context);
|
||||
context.painter().pop_stacking_context(pop_stacking_context_params);
|
||||
} else {
|
||||
context.painter().push_stacking_context(push_stacking_context_params);
|
||||
context.painter().translate(affine_transform.translation().to_rounded<int>());
|
||||
context.painter().push_stacking_context(push_stacking_context_params);
|
||||
paint_internal(context);
|
||||
context.painter().pop_stacking_context(pop_stacking_context_params);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue