mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +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
@@ -1414,7 +1414,7 @@ NonnullRefPtr<Gfx::PaintingSurface> TraversableNavigable::painting_surface_for_b
|
||||
#ifdef USE_VULKAN
|
||||
// Vulkan: Try to create an accelerated surface.
|
||||
new_surface = Gfx::PaintingSurface::create_with_size(m_skia_backend_context, backing_store.size(), Gfx::BitmapFormat::BGRA8888, Gfx::AlphaType::Premultiplied);
|
||||
new_surface->on_flush = [&bitmap = bitmap](auto& surface) { surface.read_into_bitmap(bitmap); };
|
||||
new_surface->on_flush = [backing_store = static_cast<NonnullRefPtr<Painting::BackingStore>>(backing_store)](auto& surface) { surface.read_into_bitmap(backing_store->bitmap()); };
|
||||
#endif
|
||||
#ifdef AK_OS_MACOS
|
||||
// macOS: Wrap an IOSurface if available.
|
||||
|
||||
Reference in New Issue
Block a user