Chrome Compositor Architecture: LayerTreeHost and LayerTreeHostImpl
Blink2863 Loka 2025

Chrome Compositor Architecture: LayerTreeHost and LayerTreeHostImpl

The sources provide an extensive architectural overview of the Chrome cc compositor module, focusing on the collaboration between three critical classes: LayerTreeHost (LTH), LayerTreeHostImpl (LTHI), and LayerTreeHostClient. The LTH resides on the main thread, acting as the public API that receives content updates from the embedder (like Blink) and initiates the frame pipeline. The LTHI runs on the dedicated compositor thread, handling crucial tasks such as rasterization, impl-side animations, and input processing, ultimately producing a CompositorFrame for the Viz display compositor. Finally, the LayerTreeHostClient is an interface implemented by the renderer (or UI) that allows the compositor to drive frame updates (e.g., BeginMainFrame) and receive feedback about commit and presentation timing, ensuring thread synchronization is managed primarily through the blocking Commit Phase and the Activation Phase.



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