Skip to main content

VsyncObserver

Trait VsyncObserver 

Source
pub trait VsyncObserver: Send + Sync {
    // Required method
    fn vsync(&self, at: Instant, display_time: Instant);
}
Expand description

What a VsyncWaiter calls at the refresh it was asked for.

Required Methods§

Source

fn vsync(&self, at: Instant, display_time: Instant)

at is the host’s clock when the refresh was served, and display_time when the picture drawn for this refresh is expected to reach the screen, as Flutter’s waiter hands on a frame’s start and target times: a macOS display link’s targetTimestamp, the moment a VideoFrameReader is asked for the frame of.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§