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§
Sourcefn backend_kind(&self) -> BackendKind
fn backend_kind(&self) -> BackendKind
Backend that owns or produced the surface.
Sourcefn dimensions(&self) -> (u32, u32)
fn dimensions(&self) -> (u32, u32)
Surface dimensions in pixels.
Sourcefn pixel_format(&self) -> PixelFormat
fn pixel_format(&self) -> PixelFormat
Pixel format stored by the surface.
Provided Methods§
Sourcefn residency(&self) -> SurfaceResidency
fn residency(&self) -> SurfaceResidency
Memory residency of the surface.
Sourcefn execution_stats(&self) -> ExecutionStats
fn execution_stats(&self) -> ExecutionStats
Execution statistics attached to the surface.
Sourcefn memory_range(&self) -> Option<DeviceMemoryRange>
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".