mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibWeb: Store visual context nodes in arena-based tree
Replace per-node heap-allocated AtomicRefCounted AccumulatedVisualContext objects with a single contiguous Vector inside AccumulatedVisualContextTree. All nodes for a frame are now stored in one allocation, using type-safe VisualContextIndex instead of RefPtr pointers. This reduces allocation churn, improves cache locality, and opens the door for future snapshotting of visual context state — similar to how scroll offsets are snapshotted today.
This commit is contained in:
committed by
Alexander Kalenik
parent
834675aea3
commit
9d2ebe90ed
Notes:
github-actions[bot]
2026-03-11 10:17:47 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/9d2ebe90edb Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8361
@@ -101,7 +101,7 @@ Optional<Gfx::ImageCursor> CursorStyleValue::make_image_cursor(Layout::NodeWithS
|
||||
painter->clear_rect(bitmap.rect().to_type<float>(), Color::Transparent);
|
||||
|
||||
// Paint the cursor into a bitmap.
|
||||
auto display_list = Painting::DisplayList::create();
|
||||
auto display_list = Painting::DisplayList::create(Painting::AccumulatedVisualContextTree::create());
|
||||
Painting::DisplayListRecorder display_list_recorder(display_list);
|
||||
DisplayListRecordingContext paint_context { display_list_recorder, document.page().palette(), document.page().client().device_pixels_per_css_pixel(), document.page().chrome_metrics() };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user