diff options
author | Grigori Goronzy <greg@blackbox> | 2011-07-29 04:21:48 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2011-07-29 04:44:56 +0200 |
commit | d7544850775344879dd3049046c5b7ce2d52d3b3 (patch) | |
tree | c90a7181ea8ff7be5382e33a1ccdec40f568ae2a /libass/ass_cache.h | |
parent | 2aff07ec62f1f2ef8462bb2954907ecca71288fa (diff) | |
download | libass-d7544850775344879dd3049046c5b7ce2d52d3b3.tar.bz2 libass-d7544850775344879dd3049046c5b7ce2d52d3b3.tar.xz |
harfbuzz: cache glyph metrics
HarfBuzz' FreeType font functions do not cache anything and call
FT_Load_Glyph all the time, which can be slow. Add a cache for metrics
and use it with custom font functions.
Diffstat (limited to 'libass/ass_cache.h')
-rw-r--r-- | libass/ass_cache.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libass/ass_cache.h b/libass/ass_cache.h index 077e081..7375f04 100644 --- a/libass/ass_cache.h +++ b/libass/ass_cache.h @@ -48,6 +48,10 @@ typedef struct { int asc, desc; // ascender/descender } OutlineHashValue; +typedef struct { + FT_Glyph_Metrics metrics; +} GlyphMetricsHashValue; + // Create definitions for bitmap, outline and composite hash keys #define CREATE_STRUCT_DEFINITIONS #include "ass_cache_template.h" @@ -93,6 +97,7 @@ void ass_cache_stats(Cache *cache, size_t *size, unsigned *hits, void ass_cache_done(Cache *cache); Cache *ass_font_cache_create(void); Cache *ass_outline_cache_create(void); +Cache *ass_glyph_metrics_cache_create(void); Cache *ass_bitmap_cache_create(void); Cache *ass_composite_cache_create(void); |