pub struct GlyphAtlas2d { /* private fields */ }Expand description
Renderer-owned sRGB RGBA glyph atlas with exact pixels and sorted metadata.
Sim;Engine does not evict entries implicitly. Hosts can therefore treat a
successful upload as stable until they explicitly replace or restore the
atlas. Straight-alpha pixels follow the same color contract as Image2d.
Implementations§
Source§impl GlyphAtlas2d
impl GlyphAtlas2d
Sourcepub fn entries(&self) -> &[GlyphAtlasEntry]
pub fn entries(&self) -> &[GlyphAtlasEntry]
Returns registered entries sorted by glyph identity.
Sourcepub fn source_for(&self, glyph: GlyphId) -> Option<ImageTexelRect>
pub fn source_for(&self, glyph: GlyphId) -> Option<ImageTexelRect>
Returns one atlas rectangle, or None for an unregistered identity.
Sourcepub const fn budget(&self) -> GlyphAtlasBudget
pub const fn budget(&self) -> GlyphAtlasBudget
Returns the retained atlas limits.
Sourcepub fn recovery_memory_bytes(&self) -> usize
pub fn recovery_memory_bytes(&self) -> usize
Returns exact CPU bytes retained for image and glyph recovery.
Sourcepub fn gpu_allocation_bytes(&self) -> usize
pub fn gpu_allocation_bytes(&self) -> usize
Returns nominal single-level RGBA8 texel-storage bytes, excluding opaque backend alignment, tiling, allocation pages, and metadata.
Auto Trait Implementations§
impl !RefUnwindSafe for GlyphAtlas2d
impl !UnwindSafe for GlyphAtlas2d
impl Freeze for GlyphAtlas2d
impl Send for GlyphAtlas2d
impl Sync for GlyphAtlas2d
impl Unpin for GlyphAtlas2d
impl UnsafeUnpin for GlyphAtlas2d
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