diff options
author | Grigori Goronzy <greg@blackbox> | 2011-06-27 21:04:12 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2011-06-27 21:04:12 +0200 |
commit | 2a97a6cfc2c99a8998d4464d765530e08f9751ae (patch) | |
tree | ced694d216fb36787cce62f3e72cb2e9a0a7dbfd /libass/ass_cache.h | |
parent | fd1acd2373662a14f3131d1a20b587ba5e4aa393 (diff) | |
download | libass-2a97a6cfc2c99a8998d4464d765530e08f9751ae.tar.bz2 libass-2a97a6cfc2c99a8998d4464d765530e08f9751ae.tar.xz |
cache: unified bitmap cache
Similarly to the glyph cache, subclass the bitmap cache to allow both
outline bitmaps and clipping mask bitmaps to coexist in the same cache
in a much cleaner way.
Diffstat (limited to 'libass/ass_cache.h')
-rw-r--r-- | libass/ass_cache.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libass/ass_cache.h b/libass/ass_cache.h index 05903e72..077e081c 100644 --- a/libass/ass_cache.h +++ b/libass/ass_cache.h @@ -71,6 +71,17 @@ typedef struct outline_hash_key { } u; } OutlineHashKey; +typedef struct bitmap_hash_key { + enum { + BITMAP_OUTLINE, + BITMAP_CLIP, + } type; + union { + OutlineBitmapHashKey outline; + ClipMaskHashKey clip; + } u; +} BitmapHashKey; + Cache *ass_cache_create(HashFunction hash_func, HashCompare compare_func, CacheItemDestructor destruct_func, ItemSize size_func, size_t key_size, size_t value_size); |