compositing
The final rendering stage, in which separately painted layers are stacked and drawn together on screen, usually by the GPU.
In more detail
Because layers are already painted, moving or fading one with transform or opacity only needs compositing, which is why those animations stay smooth. Too many layers use extra memory, so promote elements only when they will really animate.
Related terms
- compositor thread — A browser thread, separate from the main thread, that combines layers into frames and can scroll and run some animations on its own.
- GPU — A processor with thousands of small cores that run the same operation in parallel, used for graphics and for training and running AI models.
- CSS transform — The CSS property that moves, rotates, scales or skews an element without changing the layout around it.
- will-change — A CSS hint that tells the browser an element is about to animate a given property, so it can prepare, for example by giving it its own compositor layer.
- layout — The rendering stage in which the browser calculates the exact position and size of every box on the page.
- paint — The rendering stage that records how to fill in each box's pixels: text, colours, borders, shadows and images.
Taught in
- CSS Parsing, The CSSOM And The Render Tree — Frontend Architecture & Web Platform
- Layout, Reflow, Paint And GPU Compositing Layers — Frontend Architecture & Web Platform
- Modern CSS Animations, Transitions And View Transitions API — Frontend Architecture & Web Platform