RefreshDriverObserver

Trait RefreshDriverObserver 

Source
pub(crate) trait RefreshDriverObserver {
    // Required method
    fn frame_started(&self, painter: &mut Painter) -> bool;
}
Expand description

A RefreshDriverObserver is an internal subscriber to frame start signals from the RefreshDriver. Examples of these kind of observers would be one that triggers new animation frames right after vsync signals or one that handles touch interactions once per frame.

Required Methods§

Source

fn frame_started(&self, painter: &mut Painter) -> bool

Informs the observer that a new frame has started. The observer should return true to keep observing or false if wants to stop observing and should be removed by the BaseRefreshDriver.

Implementors§