Skip to main content

DeviceSurface

Trait DeviceSurface 

Source
pub trait DeviceSurface {
    // Required methods
    fn backend_kind(&self) -> BackendKind;
    fn dimensions(&self) -> (u32, u32);
    fn pixel_format(&self) -> PixelFormat;
    fn byte_len(&self) -> usize;

    // Provided methods
    fn residency(&self) -> SurfaceResidency { ... }
    fn execution_stats(&self) -> ExecutionStats { ... }
    fn memory_range(&self) -> Option<DeviceMemoryRange> { ... }
}
Expand description

Decoded image data resident on a specific backend.

Required Methods§

Source

fn backend_kind(&self) -> BackendKind

Backend that owns or produced the surface.

Source

fn dimensions(&self) -> (u32, u32)

Surface dimensions in pixels.

Source

fn pixel_format(&self) -> PixelFormat

Pixel format stored by the surface.

Source

fn byte_len(&self) -> usize

Number of bytes represented by the surface.

Provided Methods§

Source

fn residency(&self) -> SurfaceResidency

Memory residency of the surface.

Source

fn execution_stats(&self) -> ExecutionStats

Execution statistics attached to the surface.

Source

fn memory_range(&self) -> Option<DeviceMemoryRange>

Backend-visible memory range, when the backend can expose one safely.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§