Skip to main content

Module atlas

Module atlas 

Source
Expand description

Glyph bitmap atlas cache for efficient text rendering.

This module provides a glyph bitmap atlas cache that:

  • Rasterizes glyphs once and reuses the bitmaps for subsequent draws
  • Packs glyph bitmaps into shared atlas images using guillotiere
  • Uses stable glyph keys for reliable cache hits
  • Supports multiple atlas pages for scalability
  • Implements simple age-based eviction

The core type is GlyphAtlas, which handles allocation, eviction, and pending-command queues.

Re-exports§

pub use cache::GlyphCacheStats;
pub use cache::GLYPH_PADDING;
pub use cache::GlyphAtlas;
pub use cache::GlyphCacheConfig;
pub use cache::PendingBitmapUpload;
pub use cache::PendingClearRect;
pub use commands::AtlasCommand;
pub use commands::AtlasCommandRecorder;
pub use commands::AtlasPaint;
pub use key::GlyphCacheKey;

Modules§

cache
Glyph atlas cache with LRU eviction.
commands
Deferred atlas rendering commands.
key
Cache key for glyph bitmaps stored in the atlas.
region 🔒
Atlas slot and rasterization data structures.

Structs§

AtlasConfig
Configuration for multiple atlas support.
AtlasSlot
Location and metrics of a cached glyph within an atlas page.
ImageCache
Manages image resources for the renderer.
RasterMetrics
Metadata for a rasterized glyph (no pixel data).