What the compositor actually does
The last stage of the pipeline, running on its own thread, which is exactly why transform animations survive a busy main thread.
Once layers are painted into textures, the compositor arranges them on the GPU. It can translate, scale, rotate and fade a layer without asking the main thread for anything, which is the whole reason those properties are cheap.
It is also why a janky main thread does not stop a CSS transform animation, and why the same animation written in JavaScript stutters immediately.
Key takeaways
- Transform and opacity are compositor-only. Everything else is not.
- Promoting a layer costs memory; promoting everything costs a lot of memory.
- will-change is a hint with a cost, not a free optimisation.