pub enum RenderPhase {
NoSurface,
Active,
Paused,
}Expand description
The render thread’s view of surface lifecycle state,
modelled on frust-render’s SurfacePhase: the render loop renders a
handed-off SceneFrame only while can_render — i.e.
only in RenderPhase::Active. RenderPhase::Paused is the cross-thread
backgrounding barrier (a leftover scene must NOT be submitted after a
Pause, per the iOS process-kill hazard).
Variants§
NoSurface
No usable surface: nothing to render into (initial state, or after a
RenderEvent::SurfaceDestroyed).
Active
A configured surface is available and frames may be submitted.
Paused
The app backgrounded (RenderEvent::Pause); the surface may still
exist but the render thread must not submit until RenderEvent::Resume.
Implementations§
Source§impl RenderPhase
impl RenderPhase
Sourcepub fn can_render(self) -> bool
pub fn can_render(self) -> bool
Whether the render thread may submit a frame in this phase — only
RenderPhase::Active, mirroring SurfacePhase::can_render. A render
loop checks this before encoding a handed-off SceneFrame, so a scene
left in the latest-wins slot when a Pause/Destroy is processed is
dropped rather than submitted.
Trait Implementations§
Source§impl Clone for RenderPhase
impl Clone for RenderPhase
impl Copy for RenderPhase
Source§impl Debug for RenderPhase
impl Debug for RenderPhase
impl Eq for RenderPhase
Source§impl PartialEq for RenderPhase
impl PartialEq for RenderPhase
impl StructuralPartialEq for RenderPhase
Auto Trait Implementations§
impl Freeze for RenderPhase
impl RefUnwindSafe for RenderPhase
impl Send for RenderPhase
impl Sync for RenderPhase
impl Unpin for RenderPhase
impl UnsafeUnpin for RenderPhase
impl UnwindSafe for RenderPhase
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.