cc::ScrollTree
Blink2862 Marras 2025

cc::ScrollTree

The source text provides an exhaustive technical overview of the Scroll Property Tree (cc::ScrollTree) within the Chromium compositor architecture, which is critical for enabling smooth, off-main-thread scrolling. It explains that the ScrollTree captures the hierarchy and properties of scrollable elements, utilizing individual ScrollNodes to store geometric data (like content and container bounds) and behavioral flags (such as whether scrolling is handled on the main thread or if scroll snapping is active). Furthermore, the text details how the ScrollTree works in close coordination with the Transform Tree to apply scroll-induced translations and how it manages the entire scrolling lifecycle, from input event hit-testing and scroll latching to handling overscroll and synchronizing scroll offsets back to the main thread (Blink) via commit mechanisms. This system ensures that complex features like pinch-zoom, sticky positioning, and scroll-linked animations operate correctly and efficiently on the compositor thread.

Jaksot(394)

cc::LayerImpl / PictureLayerImpl

cc::LayerImpl / PictureLayerImpl

Impl‑side layer objects that reference property‑tree nodes and emit draw quads from recorded paint (tiles).

22 Syys 202550min

cc::PropertyTrees

cc::PropertyTrees

(TransformTree / ClipTree / EffectTree / ScrollTree) with nodes cc::TransformNode / ClipNode / EffectNode / ScrollNode — The impl‑side property‑tree state that positions, clips, blends, and scrolls co...

22 Syys 202534min

cc::LayerTreeHostImpl

cc::LayerTreeHostImpl

The compositor‑thread twin that owns the active/pending trees, runs impl‑side animations/scroll, and prepares draw. Implements cc::InputHandler for threaded scrolling/pinch.

22 Syys 202546min

main —> impl cc::LayerTreeHost

main —> impl cc::LayerTreeHost

Packages updated layers/property trees; kicks a commit to the compositor thread (via the proxy).

22 Syys 202536min

blink::PropertyTreeManager

blink::PropertyTreeManager

Bridges Blink’s paint property trees into cc property trees: creates/updates cc TransformNode, ClipNode, EffectNode, and ScrollNode (including inner/outer viewport scroll nodes).

22 Syys 202539min

blink::PaintArtifactCompositor

blink::PaintArtifactCompositor

Decides what needs to be composited and prepares the main‑thread representation to feed cc (layers if needed, scrollbar compositing, etc.).

22 Syys 202542min

blink::PaintArtifact

blink::PaintArtifact

The immutable package of paint chunks + display items for this frame, used to drive compositing without re‑painting.

21 Syys 202536min

blink::TransformPaintPropertyNode / ClipPaintPropertyNode / EffectPaintPropertyNode / ScrollPaintPropertyNode

blink::TransformPaintPropertyNode / ClipPaintPropertyNode / EffectPaintPropertyNode / ScrollPaintPropertyNode

The paint property trees captured during painting (transform, clip, effect/opacity, scroll offset) that define visual & coordinate‑space state.

21 Syys 202541min