diff options
author | Grigori Goronzy <greg@blackbox> | 2011-07-10 01:53:09 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2011-07-10 01:53:09 +0200 |
commit | 131b23f717d0d775d4730d1d8ffd5195344f71a8 (patch) | |
tree | 4c9bfa5dcda2ffac9d06728fe4fa62b36f24f228 /libass | |
parent | 1500ce05a00a5d4a73728137cdf2d0a1ffa278d1 (diff) | |
download | libass-131b23f717d0d775d4730d1d8ffd5195344f71a8.tar.bz2 libass-131b23f717d0d775d4730d1d8ffd5195344f71a8.tar.xz |
Fix bitmap cache
Pass the *complete* hash key to the cache handling functions, not
only the outline-specific subkey. This mistake completely stopped
the cache from actually working and resulted in great slowdown!
Diffstat (limited to 'libass')
-rw-r--r-- | libass/ass_render.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index c0f7c87..b418bb1 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1250,7 +1250,7 @@ get_bitmap_glyph(ASS_Renderer *render_priv, GlyphInfo *info) BitmapHashValue *val; OutlineBitmapHashKey *key = &info->hash_key.u.outline; - val = ass_cache_get(render_priv->cache.bitmap_cache, key); + val = ass_cache_get(render_priv->cache.bitmap_cache, &info->hash_key); if (val) { info->bm = val->bm; @@ -1312,7 +1312,8 @@ get_bitmap_glyph(ASS_Renderer *render_priv, GlyphInfo *info) hash_val.bm_o = info->bm_o; hash_val.bm = info->bm; hash_val.bm_s = info->bm_s; - ass_cache_put(render_priv->cache.bitmap_cache, key, &hash_val); + ass_cache_put(render_priv->cache.bitmap_cache, &info->hash_key, + &hash_val); outline_free(render_priv->ftlibrary, outline); outline_free(render_priv->ftlibrary, border); |