pub struct GlyphSlot {
pub id: ImageId,
pub region: AtlasRegion,
pub padding: u32,
}Expand description
Where one glyph an atlas-routed draw sampled lives in the atlas array.
The image half of residency travels as an ImageUpload, carrying pixels;
a glyph’s pixels are produced on the GPU by the replay pass, so nothing
travels here but the rectangle — which the renderer still needs, because a
glyph paint names its slot by ImageId and only the sink that drew it was
ever handed the slot itself.
Reported per draw rather than per allocation, so a recycled handle can never
be resolved against a previous occupant’s rectangle: glifo returns an
evicted slot’s id to the shared allocator, and whatever takes it next — a
glyph or an image — reports its own rectangle on the frame it is drawn.
Fields§
§id: ImageIdThe handle the draw’s image paint names this slot by.
region: AtlasRegionThe slot’s own rectangle, padding excluded.
padding: u32Transparent padding texels glifo keeps around region.
Trait Implementations§
impl Copy for GlyphSlot
impl Eq for GlyphSlot
impl StructuralPartialEq for GlyphSlot
Auto Trait Implementations§
impl Freeze for GlyphSlot
impl RefUnwindSafe for GlyphSlot
impl Send for GlyphSlot
impl Sync for GlyphSlot
impl Unpin for GlyphSlot
impl UnsafeUnpin for GlyphSlot
impl UnwindSafe for GlyphSlot
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
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
key and return true if they are equal.