Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::render::GlyphAtlas Class Reference

Glyph atlas — per-font-size glyph cache as GPU texture. More...

#include <texture_atlas.hpp>

Classes

struct  Entry

Public Member Functions

 GlyphAtlas (int size=1024)
bool allocate (uint64_t glyph_key, int w, int h, AtlasPacker::Region &out)
void mark_used (uint64_t key, uint64_t frame)
size_t evict_stale (uint64_t current_frame, uint64_t max_age=300)
size_t entry_count () const
int width () const
 Read-only introspection for the inspector's atlas viewer.
int height () const
float occupancy () const

Detailed Description

Glyph atlas — per-font-size glyph cache as GPU texture.

Skia manages its own internal glyph cache via SkStrike, so this atlas is a supplementary cache for custom text rendering paths (e.g., SDF text).

Constructor & Destructor Documentation

◆ GlyphAtlas()

pulp::render::GlyphAtlas::GlyphAtlas ( int size = 1024)
inlineexplicit

Member Function Documentation

◆ allocate()

bool pulp::render::GlyphAtlas::allocate ( uint64_t glyph_key,
int w,
int h,
AtlasPacker::Region & out )

◆ entry_count()

size_t pulp::render::GlyphAtlas::entry_count ( ) const
inline

◆ evict_stale()

size_t pulp::render::GlyphAtlas::evict_stale ( uint64_t current_frame,
uint64_t max_age = 300 )

◆ height()

int pulp::render::GlyphAtlas::height ( ) const
inline

◆ mark_used()

void pulp::render::GlyphAtlas::mark_used ( uint64_t key,
uint64_t frame )

◆ occupancy()

float pulp::render::GlyphAtlas::occupancy ( ) const
inline

◆ width()

int pulp::render::GlyphAtlas::width ( ) const
inline

Read-only introspection for the inspector's atlas viewer.


The documentation for this class was generated from the following file: