SurfaceInterface

Trait SurfaceInterface 

Source
pub trait SurfaceInterface: CommonTraits {
    // Required methods
    fn get_capabilities(&self, adapter: &DispatchAdapter) -> SurfaceCapabilities;
    fn configure(&self, device: &DispatchDevice, config: &SurfaceConfiguration);
    fn get_current_texture(
        &self,
    ) -> (Option<DispatchTexture>, SurfaceStatus, DispatchSurfaceOutputDetail);

    // Provided method
    fn display_hdr_info(&self, adapter: &DispatchAdapter) -> DisplayHdrInfo { ... }
}
Available on custom only.

Required Methods§

Provided Methods§

Source

fn display_hdr_info(&self, adapter: &DispatchAdapter) -> DisplayHdrInfo

The backing display’s current HDR / luminance characteristics.

Defaults to crate::DisplayHdrInfo::default (all fields None) so custom backends without a display query need not override it.

Implementors§

Source§

impl SurfaceInterface for CoreSurface

Available on wgpu_core only.