LibWeb: Make DisplayList ref-counted

This change is a preparation for the upcoming changes where display
list will be nested and the same display could be owned by multiple
display list items.
This commit is contained in:
Aliaksandr Kalenik 2024-07-24 18:48:14 +03:00 committed by Andreas Kling
commit 50ab5642cc
Notes: github-actions[bot] 2024-07-25 12:34:42 +00:00
4 changed files with 12 additions and 5 deletions

View file

@ -92,7 +92,7 @@ RefPtr<Gfx::Bitmap> SVGDecodedImageData::render(Gfx::IntSize size) const
m_document->navigable()->set_viewport_size(size.to_type<CSSPixels>());
m_document->update_layout();
Painting::DisplayList display_list;
auto display_list = Painting::DisplayList::create();
Painting::DisplayListRecorder display_list_recorder(display_list);
m_document->navigable()->record_display_list(display_list_recorder, {});