GlyphCache

Glyph image cache

More...

Destructor

~this
~this()

on destroy, destroy all items (when built with USE_OPENGL version, notify OpenGL cache about removed glyphs)

Members

Aliases

glyph_ptr
alias glyph_ptr = Glyph*
Undocumented in source.

Functions

checkpoint
void checkpoint()

clear usage flags for all entries

cleanup
void cleanup()

removes entries not used after last call of checkpoint() or cleanup()

clear
void clear()

removes all entries (when built with USE_OPENGL version, notify OpenGL cache about removed glyphs)

find
glyph_ptr find(dchar ch)

try to find glyph for character in cache, returns null if not found

put
glyph_ptr put(dchar ch, glyph_ptr glyph)

put character glyph to cache

Detailed Description

Recently used glyphs are marked with glyph.lastUsage = 1

checkpoint() call clears usage marks

cleanup() removes all items not accessed since last checkpoint()

Meta