mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Make BackingStore atomic ref-counted
Some checks are pending
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
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:
parent
a0bb31f7a0
commit
e33174fca1
Notes:
github-actions[bot]
2025-04-01 01:06:13 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: e33174fca1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4167
6 changed files with 28 additions and 17 deletions
|
@ -83,8 +83,8 @@ void BackingStoreManager::reallocate_backing_stores(Gfx::IntSize size)
|
|||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
m_front_store = make<Web::Painting::IOSurfaceBackingStore>(move(front_iosurface));
|
||||
m_back_store = make<Web::Painting::IOSurfaceBackingStore>(move(back_iosurface));
|
||||
m_front_store = Web::Painting::IOSurfaceBackingStore::create(move(front_iosurface));
|
||||
m_back_store = Web::Painting::IOSurfaceBackingStore::create(move(back_iosurface));
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -96,8 +96,8 @@ void BackingStoreManager::reallocate_backing_stores(Gfx::IntSize size)
|
|||
auto front_bitmap = Gfx::Bitmap::create_shareable(Gfx::BitmapFormat::BGRA8888, Gfx::AlphaType::Premultiplied, size).release_value();
|
||||
auto back_bitmap = Gfx::Bitmap::create_shareable(Gfx::BitmapFormat::BGRA8888, Gfx::AlphaType::Premultiplied, size).release_value();
|
||||
|
||||
m_front_store = make<Web::Painting::BitmapBackingStore>(front_bitmap);
|
||||
m_back_store = make<Web::Painting::BitmapBackingStore>(back_bitmap);
|
||||
m_front_store = Web::Painting::BitmapBackingStore::create(front_bitmap);
|
||||
m_back_store = Web::Painting::BitmapBackingStore::create(back_bitmap);
|
||||
|
||||
m_page_client.page_did_allocate_backing_stores(m_front_bitmap_id, front_bitmap->to_shareable_bitmap(), m_back_bitmap_id, back_bitmap->to_shareable_bitmap());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue