Listen

Description

The sources provide an extensive architectural overview of the Chrome Compositor Animation (cc) subsystem, which is responsible for executing visual animations like transforms and opacity changes efficiently. This architecture relies on a dual-thread model, where the main thread prepares animation data, but the actual animation ticking, interpolation, and property updates happen on the dedicated compositor thread (impl thread) to ensure smooth, "hitch-free" rendering independent of main thread activity. Key components described include the AnimationHost, which coordinates animations on each thread, and the hierarchy of classes—AnimationKeyframeEffect, and KeyframeModel—that represent the animated properties and their curves. The sources detail the synchronization lifecycle of animations from creation on the main thread through the commit process to continuous per-frame ticking on the impl thread, while also distinguishing compositor-accelerated animations from those that must run on the main thread. Finally, the text explores performance strategies like GPU acceleration, frame rate synchronization, and support for modern features such as Scroll-Linked Animations and the Animation Worklet API.