pub struct DecodedImage {
pub width: u32,
pub height: u32,
pub pixels: Arc<Vec<u8>>,
}Expand description
A decoded image: shared premultiplied-RGBA pixels + dimensions. The
Arc is what DrawCommand::BlitRgba carries, so a cached image costs
zero copies per frame — and its stable content makes the compositor’s
GPU texture key (a content hash) stable across frames too.
Fields§
§width: u32§height: u32§pixels: Arc<Vec<u8>>Trait Implementations§
Source§impl Clone for DecodedImage
impl Clone for DecodedImage
Source§fn clone(&self) -> DecodedImage
fn clone(&self) -> DecodedImage
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 moreAuto Trait Implementations§
impl Freeze for DecodedImage
impl RefUnwindSafe for DecodedImage
impl Send for DecodedImage
impl Sync for DecodedImage
impl Unpin for DecodedImage
impl UnsafeUnpin for DecodedImage
impl UnwindSafe for DecodedImage
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