diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-07-18 08:33:58 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-07-18 08:33:58 +0000 |
| commit | 6e55be1557104184eb8eaa33ce7d5fd33fa1bdb5 (patch) | |
| tree | 400db2cfa710351e0af54f30e19064bef7cd6eeb /terminal.h | |
| parent | render: break out color conversion (diff) | |
render: cache generated glyphs for regular ASCII characters
To avoid having to re-generate glyphs, cache the glyphs.
For now, we only cache ASCII characters, as this allows us to lookup
the cache by simply indexing with the character (into a 256-entry
array).
Diffstat (limited to 'terminal.h')
| -rw-r--r-- | terminal.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -202,6 +202,11 @@ struct primary { uint32_t serial; }; +struct glyph_cache { + cairo_glyph_t *glyphs; + int count; +}; + struct font { cairo_scaled_font_t *font; struct { @@ -212,6 +217,8 @@ struct font { double position; double thickness; } strikeout; + + struct glyph_cache glyph_cache[256]; }; struct terminal { |
