blink::PaintController
Blink28610 Loka 2025

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 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 fields

  • PaintArtifact* 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 methods

  • UpdateCurrentPaintChunkProperties(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.


Jaksot(392)

Modern CSS Scroll Positioning and Visibility Specifications

Modern CSS Scroll Positioning and Visibility Specifications

These sources collectively define the technical standards for scroll-into-view behavior within modern CSS specifications, covering how elements are positioned and animated when navigated to or targete...

25 Tammi 38min

Chromium Unified Test Runner: Architecture and Workflows

Chromium Unified Test Runner: Architecture and Workflows

The Unified Test Runner (UTR) is a specialized developer tool designed for the Chromium project to eliminate discrepancies between local testing and Continuous Integration (CI) environments. By utiliz...

25 Tammi 31min

CSS Multi-Column Layout Modules 1 and 2

CSS Multi-Column Layout Modules 1 and 2

The provided text outlines the evolution and technical mechanics of CSS Multi-Column Layout, moving from the foundational features of Level 1 to the advanced proposals in Level 2. It explains how the ...

24 Tammi 34min

Mastering CSS Fragmentation: Levels 3 and 4

Mastering CSS Fragmentation: Levels 3 and 4

CSS fragmentation describes the mechanical process of dividing web content across multiple containers, such as printed pages, layout columns, or digital regions. The provided sources detail the evolut...

24 Tammi 36min

CSS Scroll Markers: Deep Dive into CSS Overflow Level 5

CSS Scroll Markers: Deep Dive into CSS Overflow Level 5

The provided text outlines CSS scroll markers, an emerging feature in the CSS Overflow Module Level 5 designed to create interactive navigation like carousels and tables of contents without JavaScript...

24 Tammi 35min

CSS Automatic Minimum Size in Flexbox and Grid

CSS Automatic Minimum Size in Flexbox and Grid

The provided text explains the CSS min-size: auto property and how it functions as a default constraint within Flexbox and Grid layouts. It details how this mechanism prevents elements from shrinking ...

23 Tammi 35min

Blink Layout Engine: Method Mechanisms for Flex and Grid Sizing

Blink Layout Engine: Method Mechanisms for Flex and Grid Sizing

The provided text details the internal mechanics of the Blink Layout Engine, specifically focusing on how it calculates and enforces automatic minimum sizes for Flexbox and Grid elements. It explains ...

23 Tammi 34min

Blink Engine Architecture: content-visibility: auto

Blink Engine Architecture: content-visibility: auto

The provided text explains the content-visibility: auto CSS property and its technical implementation within the Blink rendering engine. This feature boosts web performance by skipping the layout, sty...

22 Tammi 27min