summaryrefslogtreecommitdiffstats
path: root/libass/ass_render.c
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-01 15:21:34 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-01 15:21:34 +0000
commit6deff1f55ac79a647e82fdd9457e5de980b7f232 (patch)
treeb4b7bfd286ab45ef31366051b2f9f122db6d8ec5 /libass/ass_render.c
parenteaa1f9ab16f602602d9bf2ea826cd448dcb68ea8 (diff)
downloadmpv-6deff1f55ac79a647e82fdd9457e5de980b7f232.tar.bz2
mpv-6deff1f55ac79a647e82fdd9457e5de980b7f232.tar.xz
Minor code simplification.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23193 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass/ass_render.c')
-rw-r--r--libass/ass_render.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index f397a57a63..41f4ec206d 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -394,29 +394,31 @@ 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 && text_info->glyphs[i].bm == 0) {
- if ((text_info->glyphs[i].symbol == '\n') || (text_info->glyphs[i].symbol == 0))
+ glyph_info_t* info = text_info->glyphs + i;
+ if (info->glyph && info->bm == 0) {
+ if ((info->symbol == '\n') || (info->symbol == 0))
continue;
error = glyph_to_bitmap(ass_renderer->synth_priv,
- text_info->glyphs[i].glyph, text_info->glyphs[i].outline_glyph,
- &text_info->glyphs[i].bm, &text_info->glyphs[i].bm_o,
- &text_info->glyphs[i].bm_s, text_info->glyphs[i].be);
+ info->glyph, info->outline_glyph,
+ &info->bm, &info->bm_o,
+ &info->bm_s, info->be);
if (error)
- text_info->glyphs[i].symbol = 0;
+ info->symbol = 0;
// cache
- hash_val.bm_o = text_info->glyphs[i].bm_o;
- hash_val.bm = text_info->glyphs[i].bm;
- hash_val.bm_s = text_info->glyphs[i].bm_s;
- cache_add_bitmap(&(text_info->glyphs[i].hash_key), &hash_val);
+ hash_val.bm_o = info->bm_o;
+ hash_val.bm = info->bm;
+ hash_val.bm_s = info->bm_s;
+ cache_add_bitmap(&(info->hash_key), &hash_val);
}
}
for (i = 0; i < text_info->length; ++i) {
- if (text_info->glyphs[i].glyph)
- FT_Done_Glyph(text_info->glyphs[i].glyph);
- if (text_info->glyphs[i].outline_glyph)
- FT_Done_Glyph(text_info->glyphs[i].outline_glyph);
+ glyph_info_t* info = text_info->glyphs + i;
+ if (info->glyph)
+ FT_Done_Glyph(info->glyph);
+ if (info->outline_glyph)
+ FT_Done_Glyph(info->outline_glyph);
}
for (i = 0; i < text_info->length; ++i) {