summaryrefslogtreecommitdiffstats
path: root/libass/ass_cache.h
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2011-06-27 21:04:12 +0200
committerGrigori Goronzy <greg@blackbox>2011-06-27 21:04:12 +0200
commit2a97a6cfc2c99a8998d4464d765530e08f9751ae (patch)
treeced694d216fb36787cce62f3e72cb2e9a0a7dbfd /libass/ass_cache.h
parentfd1acd2373662a14f3131d1a20b587ba5e4aa393 (diff)
downloadlibass-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.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libass/ass_cache.h b/libass/ass_cache.h
index 05903e7..077e081 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);