Blink's Rendering: Fragment Tree to Layer Tree Conversion
Blink2865 Sep 2025

Blink's Rendering: Fragment Tree to Layer Tree Conversion

The provided text details Blink's rendering pipeline, specifically focusing on the conversion of the Fragment Tree to the Layer Tree within Chromium's RenderingNG architecture. It explains how layout outputs, captured as an immutable Fragment Tree, are processed through a Pre-Paint phase to build paint property trees (for transforms, clips, effects, and scrolls). Subsequently, the Paint phase generates display items grouped into paint chunks, each associated with a property tree state. Finally, the layerization algorithm (handled by the PaintArtifactCompositor) evaluates these paint chunks, applying merging heuristics and compositing reasons, to create a cc::Layer tree ready for GPU rasterization and display, with CompositorElementIds ensuring efficient synchronization for animations and scrolling.

Episoder(391)

blink::PaintChunk and blink::DisplayItemList

blink::PaintChunk and blink::DisplayItemList

grouping and content. PaintChunk: groups sequential display items that share the same property‑tree state and cull/visibility; it’s the unit we layerize and invalidate.DisplayItemList: the recorded Sk...

10 Okt 202537min

blink::PaintArtifact

blink::PaintArtifact

the immutable “what to draw” package for this frame. A PaintArtifact is the product of Blink painting: a DisplayItemList plus an ordered vector of PaintChunks. It is immutable post‑creation and design...

10 Okt 202531min

blink::PaintController

blink::PaintController

builds the display list + paint chunks and manages caching. As painters call into GraphicsContext, they also drive a PaintController which groups drawing into display items and paint chunks (each keye...

10 Okt 202529min

blink::GraphicsContext

blink::GraphicsContext

immediate drawing API that records to a display list. Painters for layout objects use GraphicsContext to “draw”—but in modern Blink those calls get recorded into a display list (PaintRecord) backed by...

10 Okt 202544min

blink::TransformPaintPropertyNode / ClipPaintPropertyNode / EffectPaintPropertyNode / ScrollPaintPropertyNode

blink::TransformPaintPropertyNode / ClipPaintPropertyNode / EffectPaintPropertyNode / ScrollPaintPropertyNode

These are the nodes within those four trees. Every piece of painted content (a “paint chunk”) is associated with a tuple of (Transform, Clip, Effect, Scroll) nodes—its PropertyTreeState. This precisel...

10 Okt 202533min

blink::PaintPropertyTreeBuilder

blink::PaintPropertyTreeBuilder

builds/updates paint property trees.Consumes the layout/fragment data and produces the four paint property trees (Transform, Clip, Effect, Scroll) for the current frame. These trees encode coordinate ...

10 Okt 202547min

blink::PrePaintTreeWalk

blink::PrePaintTreeWalk

cross‑frame pre‑paint traversal. Runs in the InPrePaint lifecycle phase. Walks the entire layout tree starting at the root LocalFrameView, updating paint invalidation state and computing the context n...

10 Okt 202531min

blink::NGPhysicalFragment and friends

blink::NGPhysicalFragment and friends

Layout takes the styled DOM and produces a fragment tree of positioned boxes. In modern Blink this is LayoutNG; the core artifact is NGPhysicalFragment, which stores geometry and is used downstream fo...

10 Okt 202537min

Populært innen Teknologi

lydartikler-fra-aftenposten
romkapsel
tomprat-med-gunnar-tjomlid
rss-avskiltet
nasjonal-sikkerhetsmyndighet-nsm
teknisk-sett
energi-og-klima
shifter
rss-impressions-2
elektropodden
hans-petter-og-co
rss-alt-vi-kan
pedagogisk-intelligens
rss-ki-praten
smart-forklart
fornybaren
teknologi-og-mennesker
rss-tendencast-kunstig-intelligens-og-juss-2
rss-alt-som-gar-pa-strom
rss-energisk