mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 18:19:03 +00:00
LibGfx+LibWeb: Reuse DisplayListPlayer and PaintingSurface when possible
Previously, we were reinstantiating the DisplayListPlayer and PaintingSurface on every paint.
This commit is contained in:
parent
a4639b3d8e
commit
342cb7addf
Notes:
github-actions[bot]
2025-01-31 12:29:12 +00:00
Author: https://github.com/gmta
Commit: 342cb7addf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3400
Reviewed-by: https://github.com/kalenikaliaksandr
12 changed files with 107 additions and 104 deletions
|
@ -90,7 +90,9 @@ RefPtr<Gfx::ImmutableBitmap> SVGMaskable::calculate_mask_of_svg(PaintContext& co
|
|||
paint_context.set_svg_transform(graphics_element.get_transform());
|
||||
paint_context.set_draw_svg_geometry_for_clip_path(is<SVGClipPaintable>(paintable));
|
||||
StackingContext::paint_svg(paint_context, paintable, PaintPhase::Foreground);
|
||||
DisplayListPlayerSkia display_list_player { *mask_bitmap };
|
||||
auto painting_surface = Gfx::PaintingSurface::wrap_bitmap(*mask_bitmap);
|
||||
DisplayListPlayerSkia display_list_player;
|
||||
display_list_player.set_surface(painting_surface);
|
||||
display_list_player.execute(display_list);
|
||||
return mask_bitmap;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue