pub struct GlyphBatchBudget { /* private fields */ }Expand description
Explicit limits for a retained many-placement glyph batch.
Retained bytes cover sprite descriptions, reusable instance conversion storage, and clip spans. Atlas storage, input runs and backend allocations are separate. GPU capacity remains bounded by the glyph count and device limit.
Implementations§
Source§impl GlyphBatchBudget
impl GlyphBatchBudget
Sourcepub const RETAINED_BYTES_PER_GLYPH: usize = ImageBatchBudget::RETAINED_BYTES_PER_SPRITE
pub const RETAINED_BYTES_PER_GLYPH: usize = ImageBatchBudget::RETAINED_BYTES_PER_SPRITE
CPU bytes required by one glyph-capacity slot, excluding clip spans.
Sourcepub const RETAINED_BYTES_PER_PLACEMENT: usize
pub const RETAINED_BYTES_PER_PLACEMENT: usize
Maximum additional CPU bytes for one non-empty placement’s clip span.
Sourcepub fn new(
max_placements: usize,
max_glyphs: usize,
max_retained_bytes: usize,
) -> Result<Self, GlyphError>
pub fn new( max_placements: usize, max_glyphs: usize, max_retained_bytes: usize, ) -> Result<Self, GlyphError>
Creates non-zero limits sufficient for one glyph and one clip span.
Sourcepub const fn max_placements(self) -> usize
pub const fn max_placements(self) -> usize
Returns the maximum submitted placements, including empty runs.
Sourcepub const fn max_glyphs(self) -> usize
pub const fn max_glyphs(self) -> usize
Returns the maximum sum of glyphs across all placements.
Sourcepub const fn max_retained_bytes(self) -> usize
pub const fn max_retained_bytes(self) -> usize
Returns the retained CPU allocation ceiling, including reusable capacity.
Trait Implementations§
Source§impl Clone for GlyphBatchBudget
impl Clone for GlyphBatchBudget
impl Copy for GlyphBatchBudget
Source§impl Debug for GlyphBatchBudget
impl Debug for GlyphBatchBudget
Source§impl Default for GlyphBatchBudget
impl Default for GlyphBatchBudget
impl Eq for GlyphBatchBudget
Source§impl PartialEq for GlyphBatchBudget
impl PartialEq for GlyphBatchBudget
impl StructuralPartialEq for GlyphBatchBudget
Auto Trait Implementations§
impl Freeze for GlyphBatchBudget
impl RefUnwindSafe for GlyphBatchBudget
impl Send for GlyphBatchBudget
impl Sync for GlyphBatchBudget
impl Unpin for GlyphBatchBudget
impl UnsafeUnpin for GlyphBatchBudget
impl UnwindSafe for GlyphBatchBudget
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.