Enum webrender::texture_cache::BudgetType
source · #[repr(u8)]enum BudgetType {
SharedColor8Linear = 0,
SharedColor8Nearest = 1,
SharedColor8Glyphs = 2,
SharedAlpha8 = 3,
SharedAlpha8Glyphs = 4,
SharedAlpha16 = 5,
Standalone = 6,
}
Expand description
The different budget types for the texture cache. Each type has its own memory budget. Once the budget is exceeded, entries with automatic eviction are evicted. Entries with manual eviction share the same budget but are not evicted once the budget is exceeded. Keeping separate budgets ensures that we don’t evict entries from unrelated textures if one texture gets full.
Variants§
Standalone = 6
Implementations§
source§impl BudgetType
impl BudgetType
pub const COUNT: usize = 7usize
pub const VALUES: [BudgetType; 7] = _
pub const PRESSURE_COUNTERS: [usize; 7] = _
pub fn iter() -> impl Iterator<Item = BudgetType>
Trait Implementations§
source§impl Clone for BudgetType
impl Clone for BudgetType
source§fn clone(&self) -> BudgetType
fn clone(&self) -> BudgetType
Returns a copy 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 BudgetType
impl Debug for BudgetType
source§impl PartialEq for BudgetType
impl PartialEq for BudgetType
source§fn eq(&self, other: &BudgetType) -> bool
fn eq(&self, other: &BudgetType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for BudgetType
impl Serialize for BudgetType
impl Copy for BudgetType
impl Eq for BudgetType
impl StructuralPartialEq for BudgetType
Auto Trait Implementations§
impl Freeze for BudgetType
impl RefUnwindSafe for BudgetType
impl Send for BudgetType
impl Sync for BudgetType
impl Unpin for BudgetType
impl UnwindSafe for BudgetType
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more