mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Make BackingStore atomic ref-counted
This is required to make sure rendering thread will keep backing stores alive in case backing stores reallocation happens during rasterization. Fixes https://github.com/LadybirdBrowser/ladybird/issues/4164
This commit is contained in:
committed by
Alexander Kalenik
parent
a0bb31f7a0
commit
e33174fca1
Notes:
github-actions[bot]
2025-04-01 01:06:13 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/e33174fca1b Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4167
@@ -56,7 +56,7 @@ ErrorOr<GC::Ref<HTML::HTMLCanvasElement>, WebDriver::Error> draw_bounding_box_fr
|
||||
Gfx::IntRect paint_rect { rect.x(), rect.y(), paint_width, paint_height };
|
||||
|
||||
auto bitmap = MUST(Gfx::Bitmap::create(Gfx::BitmapFormat::BGRA8888, Gfx::AlphaType::Premultiplied, canvas.surface()->size()));
|
||||
auto backing_store = Web::Painting::BitmapBackingStore(bitmap);
|
||||
auto backing_store = Painting::BitmapBackingStore::create(bitmap);
|
||||
IGNORE_USE_IN_ESCAPING_LAMBDA bool did_paint = false;
|
||||
browsing_context.page().client().start_display_list_rendering(paint_rect.to_type<Web::DevicePixels>(), backing_store, {}, [&did_paint] {
|
||||
did_paint = true;
|
||||
|
||||
Reference in New Issue
Block a user