summaryrefslogtreecommitdiffstats
path: root/libass/ass_render.c
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-04-20 23:11:39 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-04-20 23:11:39 +0000
commitb9809c1e13c59fec291ca9fd20911808acb5b154 (patch)
tree05ed9dad840eae8d7e435564b270e04a6bcc2012 /libass/ass_render.c
parentd9741a027806458e5b41283760c71e107e84a000 (diff)
downloadmpv-b9809c1e13c59fec291ca9fd20911808acb5b154.tar.bz2
mpv-b9809c1e13c59fec291ca9fd20911808acb5b154.tar.xz
Because of the outline glyph cache it is now possible for glyph_info_t to have
both non-zero glyph and bitmap at the same time. In that case, bitmap should not be generated anew. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23041 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass/ass_render.c')
-rw-r--r--libass/ass_render.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index eafcd9668e..486b58ea14 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -393,7 +393,7 @@ static ass_image_t* render_text(text_info_t* text_info, int dst_x, int dst_y)
ass_image_t** tail = &head;
for (i = 0; i < text_info->length; ++i) {
- if (text_info->glyphs[i].glyph) {
+ if (text_info->glyphs[i].glyph && text_info->glyphs[i].bm == 0) {
if ((text_info->glyphs[i].symbol == '\n') || (text_info->glyphs[i].symbol == 0))
continue;
error = glyph_to_bitmap(ass_renderer->synth_priv,
@@ -1950,11 +1950,13 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images)
FT_Vector shift;
glyph_info_t* info = text_info.glyphs + i;
+ if (info->bm == 0) {
// calculating shift vector
shift.x = int_to_d6(info->pos.x + device_x - center.x);
shift.y = - int_to_d6(info->pos.y + device_y - center.y);
transform_3d(shift, &info->glyph, &info->outline_glyph, info->frx, info->fry, info->frz);
+ }
}
}