mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 02:59:45 +00:00
LibWeb+WebContent: Move display list rasterization off the main thread
The display list is an immutable data structure, so once it's created, rasterization can be moved to a separate thread. This allows more room for performing other tasks between processing HTML rendering tasks. This change makes PaintingSurface, ImmutableBitmap, and GlyphRun atomic ref-counted, as they are shared between the main and rendering threads by being included in the display list.
This commit is contained in:
parent
86b831750d
commit
24e2c402f5
Notes:
github-actions[bot]
2025-03-31 14:59:11 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 24e2c402f5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4152
16 changed files with 180 additions and 42 deletions
|
@ -1,14 +1,14 @@
|
|||
/*
|
||||
* Copyright (c) 2023-2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
||||
* Copyright (c) 2023-2025, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/AtomicRefCounted.h>
|
||||
#include <AK/Forward.h>
|
||||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibGfx/ColorSpace.h>
|
||||
#include <LibGfx/Forward.h>
|
||||
|
@ -20,7 +20,7 @@ namespace Gfx {
|
|||
|
||||
struct ImmutableBitmapImpl;
|
||||
|
||||
class ImmutableBitmap final : public RefCounted<ImmutableBitmap> {
|
||||
class ImmutableBitmap final : public AtomicRefCounted<ImmutableBitmap> {
|
||||
public:
|
||||
static NonnullRefPtr<ImmutableBitmap> create(NonnullRefPtr<Bitmap> bitmap, ColorSpace color_space = {});
|
||||
static NonnullRefPtr<ImmutableBitmap> create(NonnullRefPtr<Bitmap> bitmap, AlphaType, ColorSpace color_space = {});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue