Summary
Layout — geometry changed, reflow subtree. Paint — pixels drawn (color, text, shadows). Composite — layers combined by GPU. Changing width triggers layout; changing color often paint-only; transform/opacity often compositor-only. Use compositor-friendly animations; avoid animating layout properties at 60fps.
Code example
.box {
/* layout + paint + composite */
width: 200px;
background: red;
/* compositor-only — no layout */
transform: translateX(100px);
opacity: 0.9;
}
Key points
- Layout — geometry changed, reflow subtree.
- Paint — pixels drawn (color, text, shadows).
- Composite — layers combined by GPU.
- Changing
widthtriggers layout; changingcoloroften paint-only;transform/opacityoften compositor-only. - Use compositor-friendly animations; avoid animating layout properties at 60fps.