diff options
author | Grigori Goronzy <greg@blackbox> | 2011-06-20 22:50:34 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2011-06-20 22:50:34 +0200 |
commit | e5704aa76a2712782442156986f74b8766077ee1 (patch) | |
tree | 755509f7c315f4b542b6bd8b2c5e190206cdf355 /libass/ass_cache.c | |
parent | 3a0055a7bd1d6378aece89db0d17cc0ac804a89b (diff) | |
download | libass-e5704aa76a2712782442156986f74b8766077ee1.tar.bz2 libass-e5704aa76a2712782442156986f74b8766077ee1.tar.xz |
Convert outline processing and caching from glyphs to bare outlines
This introduces functions to use and copy pointered outline objects
easily and uses these instead of glyphs everywhere.
Previously the glyph cache was abused for caching vector clipping masks,
but this isn't possible anymore (nor desirable), thus vector clipping
cache has been disabled for the moment.
Diffstat (limited to 'libass/ass_cache.c')
-rw-r--r-- | libass/ass_cache.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libass/ass_cache.c b/libass/ass_cache.c index e6dae0a..5f24548 100644 --- a/libass/ass_cache.c +++ b/libass/ass_cache.c @@ -22,7 +22,7 @@ #include <inttypes.h> #include <ft2build.h> #include FT_FREETYPE_H -#include FT_GLYPH_H +#include FT_OUTLINE_H #include <assert.h> @@ -105,21 +105,23 @@ static size_t bitmap_size(void *value, size_t value_size) static void glyph_destruct(void *key, void *value) { GlyphHashValue *v = value; - if (v->glyph) - FT_Done_Glyph(v->glyph); - if (v->outline_glyph) - FT_Done_Glyph(v->outline_glyph); + if (v->outline) + outline_free(v->lib, v->outline); + if (v->border) + outline_free(v->lib, v->border); free(key); free(value); } static size_t glyph_size(void *value, size_t value_size) { +#if 0 GlyphHashValue *val = value; if (val->glyph && val->glyph->format == FT_GLYPH_FORMAT_BITMAP) { FT_Bitmap *bitmap = &((FT_BitmapGlyph) val->glyph)->bitmap; return bitmap->rows * bitmap->pitch; } +#endif return 0; } |