1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 09:34:57 +09:00

LibWeb: Move painting surface allocation into rendering thread

Skia has a check in debug mode to verify that surface is only used
within one thread. Before this change we were violating this by
allocating surfaces on the main thread while using and destructing them
on the rendering thread.
This commit is contained in:
Aliaksandr Kalenik 2025-04-03 18:03:17 +02:00 committed by Alexander Kalenik
parent 3169747989
commit 12a2aebeb6
Notes: github-actions[bot] 2025-04-03 20:02:46 +00:00
6 changed files with 73 additions and 52 deletions

View file

@ -6,8 +6,8 @@
#pragma once
#include <AK/AtomicRefCounted.h>
#include <AK/Noncopyable.h>
#include <AK/RefCounted.h>
#include <LibThreading/Mutex.h>
#ifdef USE_VULKAN
@ -25,7 +25,7 @@ namespace Gfx {
class MetalContext;
class SkiaBackendContext : public RefCounted<SkiaBackendContext> {
class SkiaBackendContext : public AtomicRefCounted<SkiaBackendContext> {
AK_MAKE_NONCOPYABLE(SkiaBackendContext);
AK_MAKE_NONMOVABLE(SkiaBackendContext);