pub enum FrameOutcome {
Rendered,
Skipped,
NeedsReconfigure,
Error(SurfaceRenderError),
}Expand description
Outcome of PlatformWindow::render_frame. Mirrors the wgpu
surface-status cases that matter to the caller so the app loop can
decide how to respond (ignore, reconfigure, log) without every frame
getting logged as an error.
Variants§
Rendered
Frame was rendered and presented.
Skipped
wgpu reported the window as occluded or the acquire timed out.
Per wgpu guidance, skip this frame. On macOS, the initial paint
after window creation often hits Occluded one or more times
before Metal finishes compositing, so the caller should still
request another redraw once — unless it already knows the
window is occluded via WindowEvent::Occluded(true).
NeedsReconfigure
Surface became outdated (resize, scale change, device switch). Caller should reconfigure the surface and try again.
Error(SurfaceRenderError)
Acquisition failed with a non-transient error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FrameOutcome
impl RefUnwindSafe for FrameOutcome
impl Send for FrameOutcome
impl Sync for FrameOutcome
impl Unpin for FrameOutcome
impl UnsafeUnpin for FrameOutcome
impl UnwindSafe for FrameOutcome
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.