pub struct MemoryBudget {
pub shaping_bytes: usize,
pub layout_bytes: usize,
pub diff_bytes: usize,
pub width_cache_entries: usize,
pub shaping_cache_entries: usize,
}Expand description
Transient per-frame memory budget.
These are ceilings for scratch allocations that are live during a single frame. Persistent caches (width cache, shaping cache) are accounted separately in their own capacity configs.
Fields§
§shaping_bytes: usizeMaximum bytes for shaping scratch (glyph buffers, cluster maps).
layout_bytes: usizeMaximum bytes for layout scratch (constraint vectors, flex splits).
diff_bytes: usizeMaximum bytes for diff scratch (dirty bitmaps, change lists).
width_cache_entries: usizeMaximum entries in the width cache.
shaping_cache_entries: usizeMaximum entries in the shaping cache.
Implementations§
Source§impl MemoryBudget
impl MemoryBudget
Sourcepub const fn transient_total(&self) -> usize
pub const fn transient_total(&self) -> usize
Total transient ceiling (shaping + layout + diff).
Trait Implementations§
Source§impl Clone for MemoryBudget
impl Clone for MemoryBudget
Source§fn clone(&self) -> MemoryBudget
fn clone(&self) -> MemoryBudget
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemoryBudget
impl Debug for MemoryBudget
Source§impl Display for MemoryBudget
impl Display for MemoryBudget
Source§impl PartialEq for MemoryBudget
impl PartialEq for MemoryBudget
impl Copy for MemoryBudget
impl Eq for MemoryBudget
impl StructuralPartialEq for MemoryBudget
Auto Trait Implementations§
impl Freeze for MemoryBudget
impl RefUnwindSafe for MemoryBudget
impl Send for MemoryBudget
impl Sync for MemoryBudget
impl Unpin for MemoryBudget
impl UnsafeUnpin for MemoryBudget
impl UnwindSafe for MemoryBudget
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.