pub struct DefaultRenderLoop { /* private fields */ }Expand description
Default implementation of the application render loop.
The render loop is responsible for advancing the animation timer and
updating the scene graph for visible windows. It owns the sleep/wake
state machine: setting the timer’s tick to a callback to start the timer
and to None to stop it, under a lock so that timer implementations
never see concurrent changes.
Implementations§
Source§impl DefaultRenderLoop
impl DefaultRenderLoop
Sourcepub fn new(timer: Arc<dyn IRenderTimer>) -> Arc<DefaultRenderLoop> ⓘ
pub fn new(timer: Arc<dyn IRenderTimer>) -> Arc<DefaultRenderLoop> ⓘ
Initializes a new instance of the DefaultRenderLoop class.
Sourcepub fn timer(&self) -> &Arc<dyn IRenderTimer> ⓘ
pub fn timer(&self) -> &Arc<dyn IRenderTimer> ⓘ
The timer that drives the loop.
Trait Implementations§
Source§impl Drop for DefaultRenderLoop
impl Drop for DefaultRenderLoop
Source§impl IRenderLoop for DefaultRenderLoop
impl IRenderLoop for DefaultRenderLoop
Source§fn remove(&self, i: &Arc<dyn IRenderLoopTask>)
fn remove(&self, i: &Arc<dyn IRenderLoopTask>)
Removes an update task.
Source§fn runs_in_background(&self) -> bool
fn runs_in_background(&self) -> bool
Indicates if the rendering is done on a non-UI thread.
Source§fn wakeup(&self)
fn wakeup(&self)
Wakes up the render loop to schedule the next tick.
Thread-safe: can be called from any thread.
Source§fn request_frame_out_of_turn(&self)
fn request_frame_out_of_turn(&self)
Asks for a frame out of turn: a tick as soon as the thread that ticks
can produce one. Not from upstream. Read more
Auto Trait Implementations§
impl !Freeze for DefaultRenderLoop
impl !RefUnwindSafe for DefaultRenderLoop
impl !UnwindSafe for DefaultRenderLoop
impl Send for DefaultRenderLoop
impl Sync for DefaultRenderLoop
impl Unpin for DefaultRenderLoop
impl UnsafeUnpin for DefaultRenderLoop
Blanket Implementations§
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