GlyphStripCache class

LRU cache of rasterized glyph strips, replayed by StripGenerator.fillOutline.

Keys are (immutable outline identity, quantized matrix), so entries never go stale - the caps just bound memory. One instance is safe to share across generators on the same isolate (shared is the default); entries retain their FlattenedOutline keys, so a hard clear releases font memory if needed.

Constructors

GlyphStripCache({int maxEntries = 32768, int maxAlphaBytes = 32 << 20})

Properties

alphaBytes → int
no setter
bypasses ↔ int
getter/setter pair
entryCount → int
no setter
firstSights ↔ int
First-sight draws that rendered directly (cache-on-second-sight gate).
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
hits ↔ int
getter/setter pair
maxAlphaBytes → int
final
maxEntries → int
final
misses ↔ int
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetStats() → void
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

shared → GlyphStripCache
Process-wide default instance.
final

Constants

maxGlyphSide → const int
Glyphs larger than this on either side (device px) bypass the cache.