pub struct Image2d { /* private fields */ }Expand description
Renderer-owned straight-alpha sRGB RGBA image with exact recovery pixels.
Source bytes use row-major top-to-bottom R8 G8 B8 A8 texels. The sRGB GPU
texture decodes RGB to linear light before tinting and alpha composition;
alpha remains linear. Retained bytes make device-loss restoration exact.
Implementations§
Source§impl Image2d
impl Image2d
Sourcepub const fn budget(&self) -> ImageBudget
pub const fn budget(&self) -> ImageBudget
Returns the retained creation/replacement budget.
Sourcepub fn pixels(&self) -> &[u8] ⓘ
pub fn pixels(&self) -> &[u8] ⓘ
Returns exact CPU recovery pixels in row-major sRGB RGBA8 form.
Sourcepub fn recovery_memory_bytes(&self) -> usize
pub fn recovery_memory_bytes(&self) -> usize
Returns retained CPU recovery bytes.
Sourcepub fn gpu_allocation_bytes(&self) -> usize
pub fn gpu_allocation_bytes(&self) -> usize
Returns nominal single-level RGBA8 texel-storage bytes requested from the GPU, excluding backend row/tile/page alignment and metadata.
Sourcepub fn full_rect(&self) -> ImageTexelRect
pub fn full_rect(&self) -> ImageTexelRect
Returns a full-image atlas rectangle.
Auto Trait Implementations§
impl !RefUnwindSafe for Image2d
impl !UnwindSafe for Image2d
impl Freeze for Image2d
impl Send for Image2d
impl Sync for Image2d
impl Unpin for Image2d
impl UnsafeUnpin for Image2d
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