pub struct ImageRef<'a> {
pub id: u64,
pub version: u64,
pub view: PixelView<'a>,
}Expand description
An image with the identity a painter needs to cache it.
The same shape as AtlasPage, for the same reason: the software
rasteriser composites the pixels and is done, and a GPU would rather upload
them once and draw a quad forever. id says which image and version
whether its bytes are the ones uploaded last time — it changes when the
pixels are replaced and never otherwise.
Fields§
§id: u64Unique per image for the life of the process.
version: u64Changes whenever the pixels do.
view: PixelView<'a>The pixels, premultiplied.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ImageRef<'a>
impl<'a> RefUnwindSafe for ImageRef<'a>
impl<'a> Send for ImageRef<'a>
impl<'a> Sync for ImageRef<'a>
impl<'a> Unpin for ImageRef<'a>
impl<'a> UnsafeUnpin for ImageRef<'a>
impl<'a> UnwindSafe for ImageRef<'a>
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