Paint & Compositing
Paint commands, layers, the compositor thread and the frame budget. Why `transform` and `opacity` are often cheaper to animate, stated as a mechanism rather than a slogan.
Painting does not produce pixels directly: it records an ordered list of drawing commands per layer, which a rasteriser later turns into bitmaps.
A layer is a separately rasterised surface the compositor can transform and blend on its own thread — powerful, conditional, and paid for in memory.
Why `transform` and `opacity` can be driven by the compositor without the main thread — stated as a mechanism, with the conditions under which it is simply not true.
A display refreshing 60 times a second gives roughly 16.7ms per frame — a useful baseline that shrinks on faster displays and is shared with the browser's own work.
Scrolling is handled by the compositor when it can be, and by the main thread when your code forces it — which is why one listener can make a whole page feel broken.
Promoting everything with `will-change` trades main-thread paint for GPU memory and per-frame compositing — and past a small number of layers that trade inverts.