pub struct Surface { /* private fields */ }
Implementations§
source§impl Surface
impl Surface
pub fn info(&self) -> &SurfaceInfo
pub fn capabilities(&self) -> &SurfaceCapabilities
sourcepub fn update(&mut self) -> Result<(), SurfaceError>
pub fn update(&mut self) -> Result<(), SurfaceError>
Update surface images. Does nothing if not configured.
pub fn configure(
&mut self,
usage: ImageUsage,
format: Format,
mode: PresentMode
) -> Result<(), SurfaceError>
pub fn acquire_image(&mut self) -> Result<SurfaceImage<'_>, SurfaceError>
sourcepub fn get_refresh_cycle_duration(&self) -> Result<u64, SurfaceError>
pub fn get_refresh_cycle_duration(&self) -> Result<u64, SurfaceError>
Returns refresh duration of the display associated with this swapchain. Returned value is the number of nanoseconds from the start of one refresh cycle to the next.