mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 18:02:20 +00:00
LibWeb: Protect SkiaBackendContext with a mutex
The Skia Ganesh backend we currently use doesn't support painting from multiple threads, which could happen before this change when the main thread used Skia to paint on the HTML canvas while the rendering thread was working on display list rasterization. Fixes https://github.com/LadybirdBrowser/ladybird/issues/4172
This commit is contained in:
parent
24527b6ae3
commit
fd147e6be0
Notes:
github-actions[bot]
2025-04-01 21:40:01 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: fd147e6be0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4175
7 changed files with 98 additions and 29 deletions
|
@ -36,6 +36,17 @@ static bool command_is_clip_or_mask(Command const& command)
|
|||
}
|
||||
|
||||
void DisplayListPlayer::execute(DisplayList& display_list, RefPtr<Gfx::PaintingSurface> surface)
|
||||
{
|
||||
if (surface) {
|
||||
surface->lock_context();
|
||||
}
|
||||
execute_impl(display_list, surface);
|
||||
if (surface) {
|
||||
surface->unlock_context();
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayListPlayer::execute_impl(DisplayList& display_list, RefPtr<Gfx::PaintingSurface> surface)
|
||||
{
|
||||
if (surface)
|
||||
m_surfaces.append(*surface);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue