summaryrefslogtreecommitdiffstats
path: root/libass/ass_render.c
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-01 15:12:36 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-01 15:12:36 +0000
commit8ffc80384100d8bef9dcc70e1df1040e9d494265 (patch)
treec487a6e0fdb84a024b148dd0e582cc2ceca5e42a /libass/ass_render.c
parent3e9be13d66a75b3bb94176901f1343e4c7ce17b7 (diff)
downloadmpv-8ffc80384100d8bef9dcc70e1df1040e9d494265.tar.bz2
mpv-8ffc80384100d8bef9dcc70e1df1040e9d494265.tar.xz
Move transform_3d() call to get_bitmap_glyph().
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23191 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass/ass_render.c')
-rw-r--r--libass/ass_render.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index e704338645..d4c2bc0311 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -1276,6 +1276,8 @@ static void get_outline_glyph(int symbol, glyph_info_t* info, FT_Vector* advance
}
}
+static void transform_3d(FT_Vector shift, FT_Glyph* glyph, FT_Glyph* glyph2, double frx, double fry, double frz);
+
/**
* \brief Get normal and outline glyphs from cache (if possible) or font face
* \param index face glyph index
@@ -1296,8 +1298,14 @@ static void get_bitmap_glyph(glyph_info_t* info)
info->bm = val->bm;
info->bm_o = val->bm_o;
info->bm_s = val->bm_s;
- } else
+ } else {
+ FT_Vector shift;
info->bm = info->bm_o = info->bm_s = 0;
+ // calculating shift vector
+ shift.x = int_to_d6(info->hash_key.shift_x);
+ shift.y = int_to_d6(info->hash_key.shift_y);
+ transform_3d(shift, &info->glyph, &info->outline_glyph, info->frx, info->fry, info->frz);
+ }
}
/**
@@ -1949,7 +1957,6 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images)
}
for (i = 0; i < text_info.length; ++i) {
- FT_Vector shift;
glyph_info_t* info = text_info.glyphs + i;
if (info->hash_key.frx || info->hash_key.fry || info->hash_key.frz) {
@@ -1960,14 +1967,6 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images)
info->hash_key.shift_y = 0;
}
get_bitmap_glyph(info);
-
- if (info->bm == 0) {
- // calculating shift vector
- shift.x = int_to_d6(info->hash_key.shift_x);
- shift.y = int_to_d6(info->hash_key.shift_y);
-
- transform_3d(shift, &info->glyph, &info->outline_glyph, info->frx, info->fry, info->frz);
- }
}
}