pub struct FrameMeta {
pub frame_time: FrameTime,
pub size: SurfaceSize,
pub frame_id: u64,
pub paint_serial: u64,
}Expand description
Per-frame metadata riding the scene-handoff channel alongside the scene itself.
Fields§
§frame_time: FrameTimeThe shell’s frame clock for this frame (Choreographer/CADisplayLink/
desktop epoch), threaded through to PaintCtx::frame_time so the render
thread advances animations against the same clock the UI thread painted
with. Only differences of two FrameTimes carry meaning (see its
docs).
size: SurfaceSizeThe surface size this scene was laid out for — the render thread checks it against the live swapchain configuration before encoding.
frame_id: u64Monotonically increasing per-frame id the UI thread stamps, so a dropped (latest-wins-replaced) frame is observable in diagnostics and so a render-side report can be paired back to the frame that produced it.
paint_serial: u64The paint serial the render root minted for this scene
(frust_core::PaintOutcome::paint_serial). The render thread names it
to the renderer (SurfaceRenderer::note_scene_serial) before encoding
the scene, so the resident-key ledger it publishes once the scene is
committed carries it — and a scene this slot drops never does. A
separate field from frame_id: that one counts hand-offs, this one
counts paints, and only the paint’s own number can be compared against
what a widget recorded during it.