pub(crate) struct GlyphAtlasResources {
pub(crate) glyph_atlas: GlyphAtlas,
pub(crate) image_cache: ImageCache,
pub(crate) glyph_renderer: Box<RenderContext>,
pub(crate) pixmaps: Vec<Arc<Pixmap>>,
page_width: u16,
page_height: u16,
}Fields§
§glyph_atlas: GlyphAtlas§image_cache: ImageCache§glyph_renderer: Box<RenderContext>§pixmaps: Vec<Arc<Pixmap>>One Pixmap per atlas page, grown on demand.
page_width: u16Width of each atlas page in pixels.
page_height: u16Height of each atlas page in pixels.
Implementations§
Source§impl GlyphAtlasResources
impl GlyphAtlasResources
pub(crate) fn with_config( page_width: u16, page_height: u16, level: Level, eviction_config: GlyphCacheConfig, ) -> Self
pub(crate) fn maintain(&mut self)
Source§impl GlyphAtlasResources
impl GlyphAtlasResources
Sourcepub(crate) fn save_atlas_pages_to(&self, path_prefix: &str)
pub(crate) fn save_atlas_pages_to(&self, path_prefix: &str)
Save all atlas pages to PNG files with a custom path prefix.
Files are saved as {path_prefix}_atlas_page_{index}.png.
Sourcepub(crate) fn save_atlas_pages(&self)
pub(crate) fn save_atlas_pages(&self)
Save all atlas pages to PNG files for debugging.
Files are saved to examples/_output/vello_cpu_atlas_page_{index}.png.
Source§impl GlyphAtlasResources
impl GlyphAtlasResources
Sourcepub(crate) fn stats(&self) -> GlyphCacheStats
pub(crate) fn stats(&self) -> GlyphCacheStats
Get detailed statistics about cached glyphs.
Sourcepub(crate) fn log_atlas_stats(&self)
pub(crate) fn log_atlas_stats(&self)
Log detailed atlas statistics at info level.
Sourcepub(crate) fn all_keys(&self) -> impl Iterator<Item = &GlyphCacheKey>
pub(crate) fn all_keys(&self) -> impl Iterator<Item = &GlyphCacheKey>
Returns all cached glyph keys (for debugging).
Sourcepub(crate) fn log_keys_grouped(&self)
pub(crate) fn log_keys_grouped(&self)
Log all cached keys grouped by glyph ID at info level.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GlyphAtlasResources
impl !RefUnwindSafe for GlyphAtlasResources
impl Send for GlyphAtlasResources
impl !Sync for GlyphAtlasResources
impl Unpin for GlyphAtlasResources
impl UnsafeUnpin for GlyphAtlasResources
impl !UnwindSafe for GlyphAtlasResources
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