ladybird/Libraries/LibWeb/Painting/PaintStyle.cpp
Aliaksandr Kalenik b36e6c9b97 Compositor+LibWeb: Pass AVC trees separately from display lists
Display lists owned the accumulated visual context tree through a
ref-counted pointer. That tied visual-context state to display-list
lifetime and made compositor updates treat the two as one unit, even
though AVC trees need to become independently updateable compositor
state.

Make accumulated visual context trees plain versioned values, have each
display list store the compatible tree version, and pass the matching
tree alongside display-list updates and replay calls. Replay verifies
that the provided tree matches the display list before executing it.

This prepares the compositor for receiving AVC tree updates separately
from display-list updates: it now accepts the tree as a separate update
parameter, stores it next to the display list, and uses that stored tree
for replay and async-scroll hit testing. Nested display-list resources
carry their own tree snapshots for the same version check.
2026-05-27 18:29:42 +01:00

21 lines
569 B
C++

/*
* Copyright (c) 2026, Tim Ledbetter <tim.ledbetter@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Painting/DisplayList.h>
#include <LibWeb/Painting/PaintStyle.h>
namespace Web::Painting {
PatternPaintStyle::PatternPaintStyle(DisplayListResource tile_display_list, Gfx::FloatRect tile_rect, Optional<Gfx::AffineTransform> pattern_transform)
: m_tile_display_list(move(tile_display_list))
, m_tile_rect(tile_rect)
, m_pattern_transform(move(pattern_transform))
{
}
PatternPaintStyle::~PatternPaintStyle() = default;
}