LibWeb: Pass PaintingSurface into DisplayListPlayer::execute()

Deleteing set_surface() makes DisplayListPlayer API a bit more intuitive
because now caller doesn't have to think whether it's necessary to
restore previous surface after execution, instead DisplayListPlayer
takes care of it by maintaining a stack of surfaces.
This commit is contained in:
Aliaksandr Kalenik 2025-04-01 19:53:16 +02:00 committed by Alexander Kalenik
commit 24527b6ae3
Notes: github-actions[bot] 2025-04-01 21:40:08 +00:00
7 changed files with 18 additions and 19 deletions

View file

@ -100,8 +100,7 @@ RefPtr<Gfx::ImmutableBitmap> SVGMaskable::calculate_mask_of_svg(PaintContext& co
StackingContext::paint_svg(paint_context, paintable, PaintPhase::Foreground);
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);
display_list_player.execute(display_list, painting_surface);
return mask_bitmap;
};
RefPtr<Gfx::Bitmap> mask_bitmap = {};