diff options
author | Grigori Goronzy <greg@blackbox> | 2009-08-12 06:36:43 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2009-08-12 06:36:43 +0200 |
commit | 8a12748e0e37adb7d8cda52c95a6c8ee36cf4172 (patch) | |
tree | a0e48366341855cb272b846922fff061e8610b9a | |
parent | 8a9ef5e2014068a348cb3e0f965113a827d93cd7 (diff) | |
download | libass-8a12748e0e37adb7d8cda52c95a6c8ee36cf4172.tar.bz2 libass-8a12748e0e37adb7d8cda52c95a6c8ee36cf4172.tar.xz |
BorderStyle cache integration
Add new fields to the cache hash key for BorderStyle 3 (glyph cache
and bitmap cache).
-rw-r--r-- | libass/ass_cache_template.h | 2 | ||||
-rw-r--r-- | libass/ass_render.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libass/ass_cache_template.h b/libass/ass_cache_template.h index 6a6c3f2..19ab00f 100644 --- a/libass/ass_cache_template.h +++ b/libass/ass_cache_template.h @@ -79,6 +79,7 @@ START(bitmap, bipmap_hash_key) FTVECTOR(advance) // subpixel shift vector FTVECTOR(shadow_offset) // shadow subpixel shift GENERIC(unsigned, drawing_hash) // hashcode of a drawing + GENERIC(unsigned, border_style) END(BitmapHashKey) // describes an outline glyph @@ -93,6 +94,7 @@ START(glyph, glyph_hash_key) FTVECTOR(outline) // border width, 16.16 GENERIC(unsigned, drawing_hash) // hashcode of a drawing GENERIC(unsigned, flags) // glyph decoration flags + GENERIC(unsigned, border_style) END(GlyphHashKey) // Cache for composited bitmaps diff --git a/libass/ass_render.c b/libass/ass_render.c index aa67727..90df1b5 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1988,6 +1988,7 @@ get_outline_glyph(ASS_Renderer *render_priv, int symbol, key.scale_y = double_to_d16(render_priv->state.scale_y); key.outline.x = render_priv->state.border_x * 0xFFFF; key.outline.y = render_priv->state.border_y * 0xFFFF; + key.border_style = render_priv->state.style->BorderStyle; key.drawing_hash = drawing->hash; } else { key.font = render_priv->state.font; @@ -2000,6 +2001,7 @@ get_outline_glyph(ASS_Renderer *render_priv, int symbol, key.outline.x = render_priv->state.border_x * 0xFFFF; key.outline.y = render_priv->state.border_y * 0xFFFF; key.flags = render_priv->state.flags; + key.border_style = render_priv->state.style->BorderStyle; } memset(info, 0, sizeof(GlyphInfo)); @@ -2732,6 +2734,8 @@ ass_render_event(ASS_Renderer *render_priv, ASS_Event *event, render_priv->state.be; text_info->glyphs[text_info->length].hash_key.blur = render_priv->state.blur; + text_info->glyphs[text_info->length].hash_key.border_style = + render_priv->state.style->BorderStyle; text_info->glyphs[text_info->length].hash_key.shadow_offset.x = double_to_d6( render_priv->state.shadow_x * render_priv->border_scale - |