EPISODE · Oct 10, 2025 · 29 MIN
blink::PaintController
from Blink286 · host Free Debreuil
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 keyed by the current property‑tree state). It also handles reuse of cached items to avoid repaint when nothing visually changed. Output is an immutable PaintArtifact. (Chromium Git Repositories)Key fieldsPaintArtifact* new_paint_artifact_ — being built for this frame;PaintArtifact* old_paint_artifact_ — previous frame for cache matching;PaintChunker paint_chunker_ — forms chunk boundaries based on property state;PaintControllerPersistentData* persistent_data_ — holds prior artifact & subsequences. (Chromium Git Repositories)Most important methodsUpdateCurrentPaintChunkProperties(const PropertyTreeStateOrAlias&) — starts/updates the current chunk when property state changes. (Chromium Git Repositories)template <class T> CreateAndAppend(...) — appends a display item (records drawing op + metadata). (Chromium Git Repositories)bool UseCachedItemIfPossible(...) — reuses prior items to skip repaints. (Chromium Git Repositories)void BeginFrame(const void* frame) / FrameFirstPaint EndFrame(const void* frame) — delimit a painting pass for metrics + cache book‑keeping. (Chromium Git Repositories)(Internals also maintain id→index maps to support O(1)/linear cache lookups.) (Chromium Git Repositories)Hands off to: the PaintArtifact it produces.
What this episode covers
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 keyed by the current property‑tree state). It also handles reuse of cached items to avoid repaint when nothing visually changed. Output is an immutable PaintArtifact. (Chromium Git Repositories)Key fieldsPaintArtifact* new_paint_artifact_ — being built for this frame;PaintArtifact* old_paint_artifact_ — previous frame for cache matching;PaintChunker paint_chunker_ — forms chunk boundaries based on property state;PaintControllerPersistentData* persistent_data_ — holds prior artifact & subsequences. (Chromium Git Repositories)Most important methodsUpdateCurrentPaintChunkProperties(const PropertyTreeStateOrAlias&) — starts/updates the current chunk when property state changes. (Chromium Git Repositories)template <class T> CreateAndAppend(...) — appends a display item (records drawing op + metadata). (Chromium Git Repositories)bool UseCachedItemIfPossible(...) — reuses prior items to skip repaints. (Chromium Git Repositories)void BeginFrame(const void* frame) / FrameFirstPaint EndFrame(const void* frame) — delimit a painting pass for metrics + cache book‑keeping. (Chromium Git Repositories)(Internals also maintain id→index maps to support O(1)/linear cache lookups.) (Chromium Git Repositories)Hands off to: the PaintArtifact it produces.
NOW PLAYING
blink::PaintController
No transcript for this episode yet
Similar Episodes
No similar episodes found.
Similar Podcasts
No similar podcasts found.