pub enum OutputFrame {
Surface {
surface: Arc<Surface>,
},
SurfaceAcquired {
view: TextureView,
surface_tex: SurfaceTexture,
},
View(Arc<TextureView>),
}Expand description
Anything that resembles a surface to render to.
Variants§
Implementations§
Source§impl OutputFrame
impl OutputFrame
Sourcepub fn acquire(&mut self) -> Result<(), SurfaceError>
pub fn acquire(&mut self) -> Result<(), SurfaceError>
If needed, acquire the surface. If the frame is Surface, after this call it will be SurfaceAcquired.
Sourcepub fn as_view(&self) -> Option<&TextureView>
pub fn as_view(&self) -> Option<&TextureView>
Turn the given surface into a texture view, if it has one.
Auto Trait Implementations§
impl Freeze for OutputFrame
impl !RefUnwindSafe for OutputFrame
impl Send for OutputFrame
impl Sync for OutputFrame
impl Unpin for OutputFrame
impl !UnwindSafe for OutputFrame
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