Struct webrender::glyph_cache::GlyphCache
source · pub struct GlyphCache {
glyph_key_caches: FastHashMap<FontInstance, ResourceClassCache<GlyphKey, GlyphCacheEntry, GlyphKeyCacheInfo>>,
current_frame: FrameId,
}
Fields§
§glyph_key_caches: FastHashMap<FontInstance, ResourceClassCache<GlyphKey, GlyphCacheEntry, GlyphKeyCacheInfo>>
§current_frame: FrameId
Implementations§
source§impl GlyphCache
impl GlyphCache
pub fn new() -> Self
pub fn insert_glyph_key_cache_for_font( &mut self, font: &FontInstance ) -> &mut ResourceClassCache<GlyphKey, GlyphCacheEntry, GlyphKeyCacheInfo>
pub fn get_glyph_key_cache_for_font_mut( &mut self, font: &FontInstance ) -> &mut ResourceClassCache<GlyphKey, GlyphCacheEntry, GlyphKeyCacheInfo>
pub fn get_glyph_key_cache_for_font( &self, font: &FontInstance ) -> &ResourceClassCache<GlyphKey, GlyphCacheEntry, GlyphKeyCacheInfo>
pub fn clear(&mut self)
pub fn delete_font_instances( &mut self, instance_keys: &[FontInstanceKey], glyph_rasterizer: &mut GlyphRasterizer )
pub fn delete_fonts(&mut self, font_keys: &[FontKey])
pub fn clear_namespace(&mut self, namespace: IdNamespace)
sourcefn clear_evicted(&mut self, texture_cache: &TextureCache)
fn clear_evicted(&mut self, texture_cache: &TextureCache)
Clear out evicted entries from glyph key caches.
sourcefn clear_empty_caches(&mut self, glyph_rasterizer: &mut GlyphRasterizer)
fn clear_empty_caches(&mut self, glyph_rasterizer: &mut GlyphRasterizer)
If possible, remove entirely any empty glyph key caches.
pub fn begin_frame( &mut self, stamp: FrameStamp, texture_cache: &mut TextureCache, glyph_rasterizer: &mut GlyphRasterizer )
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for GlyphCache
impl !Send for GlyphCache
impl !Sync for GlyphCache
impl Unpin for GlyphCache
impl !UnwindSafe for GlyphCache
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>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where F: FnOnce(&Self) -> bool,
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