summaryrefslogtreecommitdiffstats
path: root/libass/ass_cache_template.h
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2011-06-27 20:10:45 +0200
committerGrigori Goronzy <greg@blackbox>2011-06-27 20:10:45 +0200
commitfd1acd2373662a14f3131d1a20b587ba5e4aa393 (patch)
tree221ec745a8d3749a2d26a92654c500d8cdebce69 /libass/ass_cache_template.h
parent6d24b594428cacbfc2b12e36f664710643d05789 (diff)
downloadlibass-fd1acd2373662a14f3131d1a20b587ba5e4aa393.tar.bz2
libass-fd1acd2373662a14f3131d1a20b587ba5e4aa393.tar.xz
cache: use outline-bitmap hierarchy to slim down bitmap hash key
The bitmap hash key duplicated a lot of information the glyph hash key already saves. The subclassing introduced recently complicates this even more. Modify the hash key to utilize a pointer to the glyph hash value instead, which is faster and more flexible. Make sure to always empty the bitmap cache when the glyph cache is emptied.
Diffstat (limited to 'libass/ass_cache_template.h')
-rw-r--r--libass/ass_cache_template.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/libass/ass_cache_template.h b/libass/ass_cache_template.h
index cdb5826d..495ccbd5 100644
--- a/libass/ass_cache_template.h
+++ b/libass/ass_cache_template.h
@@ -61,17 +61,9 @@
// describes a bitmap; bitmaps with equivalents structs are considered identical
START(bitmap, bitmap_hash_key)
- GENERIC(char, bitmap) // bool : true = bitmap, false = outline
- GENERIC(ASS_Font *, font)
- GENERIC(double, size) // font size
- GENERIC(uint32_t, ch) // character code
- FTVECTOR(outline) // border width, 16.16 fixed point value
- GENERIC(int, bold)
- GENERIC(int, italic)
+ GENERIC(OutlineHashValue *, outline)
GENERIC(char, be) // blur edges
GENERIC(double, blur) // gaussian blur
- GENERIC(unsigned, scale_x) // 16.16
- GENERIC(unsigned, scale_y) // 16.16
GENERIC(int, frx) // signed 16.16
GENERIC(int, fry) // signed 16.16
GENERIC(int, frz) // signed 16.16
@@ -84,9 +76,6 @@ START(bitmap, bitmap_hash_key)
GENERIC(int, shift_y)
FTVECTOR(advance) // subpixel shift vector
FTVECTOR(shadow_offset) // shadow subpixel shift
- GENERIC(unsigned, drawing_hash) // hashcode of a drawing
- GENERIC(unsigned, flags) // glyph decoration
- GENERIC(unsigned, border_style)
END(BitmapHashKey)
// describes an outline glyph