[MPlayer-cvslog] r21335 - trunk/libass/ass_font.c

eugeni subversion at mplayerhq.hu
Mon Nov 27 18:34:00 CET 2006


Author: eugeni
Date: Mon Nov 27 18:33:59 2006
New Revision: 21335

Modified:
   trunk/libass/ass_font.c

Log:
Don't call FT_Set_Transform/FT_Set_Pixel_Sizes if values have not changed.


Modified: trunk/libass/ass_font.c
==============================================================================
--- trunk/libass/ass_font.c	(original)
+++ trunk/libass/ass_font.c	Mon Nov 27 18:33:59 2006
@@ -90,6 +90,13 @@
 
 void ass_font_set_transform(ass_font_t* font, FT_Matrix* m, FT_Vector* v)
 {
+	if (font->m.xx != m->xx ||
+	    font->m.xy != m->xy ||
+	    font->m.yx != m->yx ||
+	    font->m.yy != m->yy ||
+	    font->v.x != v->x ||
+	    font->v.y != v->y
+	    ) {
 	font->m.xx = m->xx;
 	font->m.xy = m->xy;
 	font->m.yx = m->yx;
@@ -97,12 +104,15 @@
 	font->v.x = v->x;
 	font->v.y = v->y;
 	FT_Set_Transform(font->face, &font->m, &font->v);
+	}
 }
 
 void ass_font_set_size(ass_font_t* font, int size)
 {
+	if (font->size != size) {
 	font->size = size;
 	FT_Set_Pixel_Sizes(font->face, 0, size);
+	}
 }
 
 FT_Glyph ass_font_get_glyph(void* fontconfig_priv, ass_font_t* font, uint32_t ch)



More information about the MPlayer-cvslog mailing list