pub trait Surface<A: Api>: Send + Sync {
    unsafe fn configure(
        &mut self,
        device: &A::Device,
        config: &SurfaceConfiguration
    ) -> Result<(), SurfaceError>; unsafe fn unconfigure(&mut self, device: &A::Device); unsafe fn acquire_texture(
        &mut self,
        timeout: Option<Duration>
    ) -> Result<Option<AcquiredSurfaceTexture<A>>, SurfaceError>; unsafe fn discard_texture(&mut self, texture: A::SurfaceTexture); }

Required Methods

Returns the next texture to be presented by the swapchain for drawing

A timeout of None means to wait indefinitely, with no timeout.

Portability

Some backends can’t support a timeout when acquiring a texture and the timeout will be ignored.

Returns None on timing out.

Implementors