pub struct SurfaceMetadata {
pub backend: BackendKind,
pub residency: SurfaceResidency,
pub dimensions: (u32, u32),
pub pixel_format: PixelFormat,
pub pitch_bytes: usize,
pub byte_offset: usize,
}Expand description
Backend-neutral metadata for a decoded accelerator surface.
Fields§
§backend: BackendKindBackend that owns or produced the surface.
residency: SurfaceResidencyMemory residency of the surface bytes.
dimensions: (u32, u32)Surface dimensions in pixels.
pixel_format: PixelFormatPixel format stored by the surface.
pitch_bytes: usizeNumber of bytes between consecutive rows.
byte_offset: usizeByte offset into the backend allocation.
Implementations§
Source§impl SurfaceMetadata
impl SurfaceMetadata
Sourcepub const fn new(
backend: BackendKind,
residency: SurfaceResidency,
dimensions: (u32, u32),
pixel_format: PixelFormat,
pitch_bytes: usize,
) -> Self
pub const fn new( backend: BackendKind, residency: SurfaceResidency, dimensions: (u32, u32), pixel_format: PixelFormat, pitch_bytes: usize, ) -> Self
Construct tight or explicitly pitched surface metadata with no byte offset.
Sourcepub const fn with_byte_offset(self, byte_offset: usize) -> Self
pub const fn with_byte_offset(self, byte_offset: usize) -> Self
Return metadata adjusted to start at byte_offset inside an allocation.
Trait Implementations§
Source§impl Clone for SurfaceMetadata
impl Clone for SurfaceMetadata
Source§fn clone(&self) -> SurfaceMetadata
fn clone(&self) -> SurfaceMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SurfaceMetadata
Source§impl Debug for SurfaceMetadata
impl Debug for SurfaceMetadata
impl Eq for SurfaceMetadata
Source§impl Hash for SurfaceMetadata
impl Hash for SurfaceMetadata
Source§impl PartialEq for SurfaceMetadata
impl PartialEq for SurfaceMetadata
impl StructuralPartialEq for SurfaceMetadata
Auto Trait Implementations§
impl Freeze for SurfaceMetadata
impl RefUnwindSafe for SurfaceMetadata
impl Send for SurfaceMetadata
impl Sync for SurfaceMetadata
impl Unpin for SurfaceMetadata
impl UnsafeUnpin for SurfaceMetadata
impl UnwindSafe for SurfaceMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more