summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2011-08-22 00:21:50 +0200
committerGrigori Goronzy <greg@blackbox>2011-08-22 00:21:50 +0200
commitce16b9e1a19c3983a20f9a09d30ab7843cccdc14 (patch)
tree7b4ca31d0e430b2f49e2fc152fe686597a2f8fd8
parenta1c830b5835294bcc8dad405636073e8efbba543 (diff)
downloadlibass-ce16b9e1a19c3983a20f9a09d30ab7843cccdc14.tar.bz2
libass-ce16b9e1a19c3983a20f9a09d30ab7843cccdc14.tar.xz
opaque box: avoid unnecessary outline copy
It's faster and easier to just create a new outline, than to copy it, free it, and create a new one. The old glyph-based code needed to do this since it's not possible to create a glyph "from scratch".
-rw-r--r--libass/ass_render.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 7a7e397..d317d98 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -986,7 +986,6 @@ static void draw_opaque_box(ASS_Renderer *render_priv, int asc, int desc,
{ .x = -sx, .y = -desc - sy },
};
- FT_Outline_Done(render_priv->ftlibrary, ol);
FT_Outline_New(render_priv->ftlibrary, 4, 1, ol);
ol->n_points = ol->n_contours = 0;
@@ -1158,7 +1157,7 @@ get_outline_glyph(ASS_Renderer *priv, GlyphInfo *info)
(info->border_x > 0 || info->border_y > 0)) {
FT_Vector advance;
- outline_copy(priv->ftlibrary, v.outline, &v.border);
+ v.border = calloc(1, sizeof(FT_Outline));
if (priv->settings.shaper == ASS_SHAPING_SIMPLE || info->drawing)
advance = v.advance;