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:
Aliaksandr Kalenik 2025-02-25 04:07:53 +01:00 committed by Alexander Kalenik
commit 24e2c402f5
Notes: github-actions[bot] 2025-03-31 14:59:11 +00:00
16 changed files with 180 additions and 42 deletions

View file

@ -324,7 +324,7 @@ public:
virtual CSS::PreferredMotion preferred_motion() const = 0;
virtual void paint_next_frame() = 0;
virtual void process_screenshot_requests() = 0;
virtual void paint(DevicePixelRect const&, Painting::BackingStore&, PaintOptions = {}) = 0;
virtual void start_display_list_rendering(DevicePixelRect const&, Painting::BackingStore&, PaintOptions, Function<void()>&& callback) = 0;
virtual Queue<QueuedInputEvent>& input_event_queue() = 0;
virtual void report_finished_handling_input_event(u64 page_id, EventResult event_was_handled) = 0;
virtual void page_did_change_title(ByteString const&) { }