LibWeb: Snapshot SVG surface into ImmutableBitmap before painting

The last consumer of draw_painting_surface now snapshots the surface
into an ImmutableBitmap and uses draw_scaled_immutable_bitmap instead,
removing the final dependency on DrawPaintingSurface.
This commit is contained in:
Aliaksandr Kalenik 2026-02-19 19:31:49 +01:00 committed by Alexander Kalenik
parent 004e5f851e
commit d9e04ec9e8
Notes: github-actions[bot] 2026-02-20 17:42:44 +00:00

View file

@ -223,8 +223,8 @@ void SVGDecodedImageData::paint(DisplayListRecordingContext& context, size_t, Gf
if (!surface)
return;
Gfx::IntRect src_rect(0, 0, dst_rect.width(), dst_rect.height());
context.display_list_recorder().draw_painting_surface(dst_rect, *surface, src_rect, scaling_mode);
auto snapshot = Gfx::ImmutableBitmap::create_snapshot_from_painting_surface(*surface);
context.display_list_recorder().draw_scaled_immutable_bitmap(dst_rect, dst_rect, *snapshot, scaling_mode);
}
}