Skip to content
AnswerWell geo Documentation

Research · 11 min read · Answerwell

Rendering Pipeline Architecture, Stages, Compositing, and Layout Structures

How Chromium's RenderingNG splits the rendering pipeline into stages, data structures, processes, and threads—and scroll and animation performance.

This page summarizes Chromium’s documentation on RenderingNG: the next-generation rendering architecture behind Blink in Chrome and other Chromium-based browsers. It explains the pipeline stages, the data structures that connect them, how work is spread across processes and threads, and the practical performance implications developers see in tools such as Lighthouse.

Rendering pipeline: from DOM changes to on-screen pixels

Section titled “Rendering pipeline: from DOM changes to on-screen pixels”

The rendering pipeline is the sequence of steps the browser uses to turn HTML, CSS, JavaScript, and other resources into pixels. In RenderingNG, rendering is organized as explicit stages with defined inputs and outputs, rather than as one opaque “draw the page” step.

The browser’s algorithms for converting HTML, CSS, and JavaScript into pixels are collectively known as the rendering pipeline.

The rendering pipeline consists of the following sequential steps: JavaScript, Style, Layout, Paint, Composite.

— Google Chrome Developers, Avoid non-composited animations

A closely related description in Blink documentation lists more granular Blink and compositor stages:

Rendering proceeds in a pipeline with a number of stages and artifacts created along the way. Each stage represents code that does one well-defined task within rendering. The artifacts are data structures that are inputs or outputs of the stages.

The stages are: Animate, Style, Layout, Pre-paint, Scroll, Paint, Commit, Layerize, Raster, decode and paint worklets, Activate, Aggregate, Draw.

— Google Chrome Developers, RenderingNG architecture

non-composited animations: why Layout, Style, or Paint hurts performance

Section titled “non-composited animations: why Layout, Style, or Paint hurts performance”

People often discover this topic when Lighthouse flags animations that are not composited. A non-composited animation is any animation that forces work in Style, Layout, or Paint instead of only Composite.

A non-composited animation is any animation that triggers one of the earlier steps in the rendering pipeline (Style, Layout, or Paint). Non-composited animations perform worse because they force the browser to do more work.

— Google Chrome Developers, Avoid non-composited animations

To keep animations on the compositor, Chromium documentation points to compositor-only properties and layer management; see Stick to compositor-only properties (linked from the same Lighthouse page) and Minimize main thread work.

RenderingNG goals: reliability, scalable performance, and fewer cliffs

Section titled “RenderingNG goals: reliability, scalable performance, and fewer cliffs”

RenderingNG is described as a multi-year rewrite intended to make rendering predictable across devices and to stop “mysterious performance cliffs.”

The north star goal motivating RenderingNG is that the browser engine implementation, and the richness of its rendering APIs, should not be a limiting factor of UX on the web.

There should be no mysterious performance cliffs.

— Google Chrome Developers, RenderingNG

High-level rendering tasks are split across modular components and then across processes and threads:

The most important takeaway is that the rendering pipeline, through careful modularization and attention to detail, has been split into a number of self-contained components. These components have then been split across parallel processes and threads to maximize scalable performance and extensibility opportunities.

— Google Chrome Developers, RenderingNG architecture

BlinkNG: turning the pipeline into a real pipeline

Section titled “BlinkNG: turning the pipeline into a real pipeline”

Blink is Chromium’s implementation of the web platform through the compositor commit step. BlinkNG is the refactoring that gave Blink a uniform entry point, immutable stage outputs, and clearer contracts between style, layout, pre-paint, and paint.

Uniform point of entry: We should always enter the pipeline at the beginning.

Immutable outputs: Once a stage has finished, its outputs should be immutable for the remainder of the rendering update.

— Google Chrome Developers, RenderingNG deep-dive: BlinkNG

Section titled “document lifecycle: two legal ways to update rendering”

Before BlinkNG, many code paths could enter rendering in the middle of the pipeline or reenter recursively. BlinkNG reduced this to two scenarios:

  1. All rendering data must be updated (for example, to produce new pixels or to hit-test for events).
  2. A specific query needs a fresh answer without a full update (many JavaScript geometry APIs).

There are now only two points of entry into the rendering pipeline, corresponding to these two scenarios. The reentrant code paths have been removed or refactored, and it is no longer possible to enter the pipeline starting at an intermediate phase.

— Google Chrome Developers, RenderingNG deep-dive: BlinkNG

CompositeAfterPaint: why layerization moved after paint

Section titled “CompositeAfterPaint: why layerization moved after paint”

Historically, layerization (deciding which content gets its own composited layer) ran before paint, which created circular dependencies between invalidation and past layer decisions. The CompositeAfterPaint project moved layerization to after paint, using display lists and property trees instead of DOM-centric guesses.

Layerization is the process of figuring out which DOM content goes into its own composited layer (which, in turn, represents a GPU texture). Before RenderingNG, layerization ran before paint, not after.

— Google Chrome Developers, RenderingNG deep-dive: BlinkNG

LayoutNG: immutable fragment trees and layout invalidation

Section titled “LayoutNG: immutable fragment trees and layout invalidation”

LayoutNG replaced a long-lived mutable layout tree with explicit inputs and an immutable fragment tree as layout’s primary output.

The immutable fragment tree is the output of the layout stage of the rendering pipeline. It represents the position and size of all elements on the page (without transforms applied).

After layout, each fragment becomes immutable and is never changed again.

— Google Chrome Developers, Key data structures in RenderingNG

under-invalidation vs exponential layout time

Section titled “under-invalidation vs exponential layout time”

Layout bugs often show up as “resize the window and it fixes itself” (under-invalidation) or as layout time that explodes with nested flex or grid (over-invalidation / performance cliffs). LayoutNG centralizes the decision to relayout by diffing parent constraints stored with each cached fragment.

Today (as described above) we have an immutable parent constraints object which describes all the inputs from the parent layout to the child. We store this with the resulting immutable fragment.

— Google Chrome Developers, RenderingNG deep-dive: LayoutNG

If there is ever a case where a layout is doing three-pass layout we’ll simply cache that pass as well.

— Google Chrome Developers, RenderingNG deep-dive: LayoutNG

LayoutNG block fragmentation (columns, print pages) completed the migration off the legacy layout engine; see RenderingNG deep-dive: LayoutNG block fragmentation.

Key data structures: property trees, display lists, compositor frames

Section titled “Key data structures: property trees, display lists, compositor frames”

RenderingNG documentation names several structures that flow between pipeline stages. Together they separate geometry, painting, and GPU compositing.

Data structure Role in plain terms
Frame tree / local frame tree fragment Which documents render in which process; site-isolated iframes appear as remote placeholders.
Immutable fragment tree Layout output: positions and sizes without transforms.
Property trees (transform, clip, effect, scroll) How transforms, filters, opacity, clipping, and scroll chain apply in screen space.
Display lists and paint chunks Low-level draw commands grouped for rasterization and layerization.
Compositor frames, tiles, quads, surfaces How rasterized tiles and embedded surfaces are stitched and drawn on the GPU.

These data structures are: Frame trees … The immutable fragment tree … Property trees … Display lists and paint chunks … Compositor frames encapsulate surfaces, render surfaces, and GPU texture tiles that are used to draw using the GPU.

— Google Chrome Developers, Key data structures in RenderingNG

property trees: four trees instead of one layer hierarchy

Section titled “property trees: four trees instead of one layer hierarchy”

Each document has four property trees. A node’s property tree state is a 4-tuple (transform, clip, effect, scroll) pointing at the ancestor nodes that affect it—used for compositing, scrolling on the compositor thread, paint invalidation, and metrics such as layout shift.

Every web document has four separate property trees: transform, clip, effect, and scroll.

— Google Chrome Developers, Key data structures in RenderingNG

Property trees are built in pre-paint, after layout, when enough information exists to model real scrolling and clipping behavior; see RenderingNG deep-dive: BlinkNG.

paint chunks and layerize: memory vs scroll performance

Section titled “paint chunks and layerize: memory vs scroll performance”

Paint walks produce display items; items sharing the same property tree state form paint chunks, which feed layerize. Merging every chunk into one layer minimizes memory but forces expensive re-raster on scroll; one layer per chunk avoids re-raster but can exhaust GPU memory.

A good general approach is to merge chunks by default, and not merge paint chunks that have property tree states that are expected to change on the compositor thread, such as with compositor-thread scrolling or compositor-thread transform animations.

— Google Chrome Developers, Key data structures in RenderingNG

compositor frames: tiles, quads, surfaces, and Viz aggregation

Section titled “compositor frames: tiles, quads, surfaces, and Viz aggregation”

The viewport is tiled so small updates do not re-raster the full page. Quads describe how textures are transformed and drawn; surfaces let one compositor frame embed another (browser UI, cross-origin iframes). Multiple compositor frames are merged in aggregation inside the Viz process.

Instead, the viewport is divided into tiles. A separate GPU texture tile backs each tile with the rasterized pixels for part of the viewport.

— Google Chrome Developers, Key data structures in RenderingNG

Multiple compositor frames are submitted to Viz, and they need to be drawn to the screen together. This is accomplished by an aggregation phase that converts them into a single, aggregated compositor frame.

— Google Chrome Developers, Key data structures in RenderingNG

Video is largely decoupled from the main page pipeline: decoded frames are handed to the compositor as surfaces or overlays; overview in Deep-dive: VideoNG.

Processes and threads: main thread, compositor thread, and Viz

Section titled “Processes and threads: main thread, compositor thread, and Viz”

RenderingNG spreads work across CPU processes for isolation and stability, and across threads so scrolling and many animations can proceed while JavaScript runs.

Process Primary rendering responsibility
Render process Renders, animates, scrolls, and routes input for a site (per tab combination).
Browser process Browser UI rendering and input routing to the correct renderer.
Viz process Aggregates compositor frames from all renderers and the browser, rasters and draws on the GPU.

The render process renders, animates, scrolls, and routes input for a single site and tab combination.

The Viz process aggregates compositing from multiple render processes plus the browser process. It rasters and draws using the GPU.

— Google Chrome Developers, RenderingNG architecture

Cross-origin frames are isolated in separate render processes when site isolation applies; the parent sees a remote frame with only placeholder geometry until Viz stitches surfaces together (Key data structures in RenderingNG).

threads: performance isolation for scroll and animation

Section titled “threads: performance isolation for scroll and animation”

The main thread runs script, parsing, most of the document lifecycle through commit, and hit testing for DOM events. The compositor thread handles input for scroll, compositor-driven animations, layerization decisions, and coordination of raster/decode work.

The main thread runs scripts, the rendering event loop, the document lifecycle, hit testing, script event dispatching, and parsing of HTML, CSS and other data formats.

The Compositor thread processes input events, performs scrolling and animations of web content, computes optimal layerization of web content, and coordinates image decodes, paint worklets and raster tasks.

— Google Chrome Developers, RenderingNG architecture

Separating the main and compositor threads is critically important for performance isolation of animation and scrolling from main thread work.

— Google Chrome Developers, RenderingNG architecture

Scrolling on the compositor thread is the canonical example of performance isolation in RenderingNG:

On the web, the best example of performance isolation is scrolling. Even on websites that have lots of slow JavaScript, scrolling can be very smooth, because it runs on a different thread that doesn’t have to depend on the JavaScript and layout thread.

— Google Chrome Developers, RenderingNG

main thread congestion: what Lighthouse “main thread work” is measuring

Section titled “main thread congestion: what Lighthouse “main thread work” is measuring”

When the main thread is busy with script, style, or layout, input and rendering updates stall.

By default, the main thread of the renderer process typically handles most code: it parses the HTML and builds the DOM, parses the CSS and applies the specified styles, and parses, evaluates, and executes the JavaScript.

The main thread also processes user events. So, any time the main thread is busy doing something else, your web page may not respond to user interactions, leading to a bad experience.

— Google Chrome Developers, Minimize main thread work

Future Chromium work described in BlinkNG includes Non-Blocking Commit and off-main-thread compositing to reduce main-thread time spent on commit and layerization (RenderingNG deep-dive: BlinkNG).

Blink is the rendering engine stage that consumes web standards and produces structures for compositing; it is not the whole browser.

Blink refers to Chromium’s implementation of the web platform, and it encompasses all the phases of rendering prior to compositing, culminating in compositor commit.

— Google Chrome Developers, RenderingNG deep-dive: BlinkNG

For a shorter map from resources to pixels, see What is Blink?. Rendering uses Skia for rasterization and the V8 engine for JavaScript, as summarized there and in Chromium documentation.

Common mistakes when reasoning about rendering performance

Section titled “Common mistakes when reasoning about rendering performance”
  • Animating layout-affecting properties (width, top, margin, etc.) forces Style and/or Layout and usually Paint, not just Composite—matching the Lighthouse definition of non-composited animations.
  • Assuming one iframe equals one cheap update: site-isolated cross-origin iframes produce separate local frame tree fragments and compositor frames that Viz must aggregate; visual property changes (viewport size, device scale factor) synchronize via sync tokens across fragments (Key data structures in RenderingNG).
  • Treating flex/grid nesting as linear cost: nested two-pass layouts can become exponentially expensive without measure/layout caching; LayoutNG aims for linear behavior with explicit caches (RenderingNG deep-dive: LayoutNG).
  • Blocking scroll on the main thread: non-passive wheel or touch listeners that call preventDefault() can force the scroll path off the compositor fast path described in the architecture walkthrough (RenderingNG architecture).
  1. Run Lighthouse performance audits and review Avoid non-composited animations and Minimize main-thread work against your heaviest pages.

  2. In Chrome DevTools Performance, record interaction and scroll while watching main-thread Layout, Paint, and Composite phases; compare with animations that use transform and opacity only, as recommended in Avoid non-composited animations.

  3. Stress-test nested flex or grid layouts called out in RenderingNG deep-dive: LayoutNG and confirm layout duration stays roughly linear when you add depth.

  4. For multi-iframe pages, verify scroll and resize stay smooth across cross-origin embeds, consistent with site isolation and Viz aggregation in RenderingNG architecture.

  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact sentence you are asking about, and we will correct or clarify it.