pub struct AtlasRegion {
pub layer: u32,
pub offset: [u32; 2],
pub size: [u32; 2],
}Expand description
Where one image’s texels live in the atlas array.
Hashable because the pending-clear list carries a set index beside it: the
same rectangle can reach ImageResidency::evictions twice before a single
clear has been serviced, and the dedup that keeps it reported once must not
be a linear scan of a list that grows with the churn rate.
Fields§
§layer: u32Array layer holding the region.
offset: [u32; 2]Pixel offset of the region’s top-left corner within that layer.
size: [u32; 2]Region extent in pixels.
Implementations§
Source§impl AtlasRegion
impl AtlasRegion
Sourcepub fn byte_len(self) -> usize
pub fn byte_len(self) -> usize
The bytes this region’s texels occupy at ATLAS_FORMAT_BYTES.
Sourcepub fn bytes_per_row(self) -> u32
pub fn bytes_per_row(self) -> u32
The row stride a texel copy of this region uses.
Trait Implementations§
Source§impl Clone for AtlasRegion
impl Clone for AtlasRegion
impl Copy for AtlasRegion
Source§impl Debug for AtlasRegion
impl Debug for AtlasRegion
impl Eq for AtlasRegion
Source§impl Hash for AtlasRegion
impl Hash for AtlasRegion
Source§impl PartialEq for AtlasRegion
impl PartialEq for AtlasRegion
impl StructuralPartialEq for AtlasRegion
Auto Trait Implementations§
impl Freeze for AtlasRegion
impl RefUnwindSafe for AtlasRegion
impl Send for AtlasRegion
impl Sync for AtlasRegion
impl Unpin for AtlasRegion
impl UnsafeUnpin for AtlasRegion
impl UnwindSafe for AtlasRegion
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.