Cache font heights in a static fixed array.

This is to avoid significant per-call overhead to get font heights,
as this is performed very frequently.
This commit is contained in:
Jonathan G Rennison
2016-01-01 21:47:34 +00:00
parent b51dd34fe4
commit 5aad0b51a3
3 changed files with 18 additions and 13 deletions

View File

@@ -19,6 +19,8 @@
typedef uint32 GlyphID;
static const GlyphID SPRITE_GLYPH = 1U << 30;
extern int font_height_cache[FS_END]; ///< Cache of font heights
/** Font cache for basic fonts. */
class FontCache {
private: