pub struct DisplayLinkTimer { /* private fields */ }Expand description
Render timer driven by a CADisplayLink, paused while the render loop is idle or the
application is in the background.
Implementations§
Source§impl DisplayLinkTimer
impl DisplayLinkTimer
Sourcepub fn new() -> Arc<DisplayLinkTimer> ⓘ
pub fn new() -> Arc<DisplayLinkTimer> ⓘ
Creates the timer and starts its thread. The options of the platform
(Platform::options) are read here, so the platform has them first.
§Panics
Panics when the thread cannot be started.
Sourcepub fn timer_thread(&self) -> &Thread
pub fn timer_thread(&self) -> &Thread
The thread of the display link: where the timer ticks and, the timer running in the background, where the compositor renders.
Trait Implementations§
Source§impl IRenderTimer for DisplayLinkTimer
impl IRenderTimer for DisplayLinkTimer
Source§fn tick(&self) -> Option<RenderTimerTick>
fn tick(&self) -> Option<RenderTimerTick>
Gets the callback to be invoked when the timer ticks.
Source§fn set_tick(&self, value: Option<RenderTimerTick>)
fn set_tick(&self, value: Option<RenderTimerTick>)
Sets the callback to be invoked when the timer ticks. Read more
Source§fn runs_in_background(&self) -> bool
fn runs_in_background(&self) -> bool
Indicates if the timer ticks on a non-UI thread.
Source§fn request_tick_out_of_turn(&self)
fn request_tick_out_of_turn(&self)
Asks for a tick out of turn: as soon as the thread that ticks can
produce one, without waiting for the next period of the timer (the
next frame of a display). Not from upstream. Read more
Auto Trait Implementations§
impl Freeze for DisplayLinkTimer
impl RefUnwindSafe for DisplayLinkTimer
impl Send for DisplayLinkTimer
impl Sync for DisplayLinkTimer
impl Unpin for DisplayLinkTimer
impl UnsafeUnpin for DisplayLinkTimer
impl UnwindSafe for DisplayLinkTimer
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more