kozan_core/compositor/frame.rs
1//! Compositor frame — what the GPU receives each vsync.
2//!
3//! Chrome: `viz::CompositorFrame`.
4
5use std::sync::Arc;
6
7use crate::paint::DisplayList;
8use crate::scroll::ScrollOffsets;
9
10/// The output the compositor produces each vsync for the GPU.
11///
12/// Contains the display list (from the view thread's last paint) and
13/// the compositor's current scroll offsets. The renderer uses these
14/// offsets to override tagged scroll transforms — no repaint needed.
15pub struct CompositorFrame {
16 pub display_list: Arc<DisplayList>,
17 /// Compositor's authoritative scroll offsets.
18 /// The renderer looks up offsets by DOM node ID (O(1) via Storage)
19 /// when it encounters a `PushTransform` tagged with `scroll_node`.
20 pub scroll_offsets: ScrollOffsets,
21}