font draw - dont alloc font props for 32 chrs.. if we are only ever

going to have less than 32.. eg textgrid. 1 per prop.



SVN revision: 81654
This commit is contained in:
Carsten Haitzler 2012-12-23 11:02:50 +00:00
parent 55f2e87201
commit ff3a370b9b
1 changed files with 3 additions and 1 deletions

View File

@ -404,6 +404,7 @@ evas_common_font_draw_prepare(Evas_Text_Props *text_props)
RGBA_Font_Int *fi;
RGBA_Font_Glyph *fg;
Eina_Inarray *glyphs;
size_t unit = 32;
EVAS_FONT_WALK_TEXT_INIT();
fi = text_props->font_instance;
@ -412,7 +413,8 @@ evas_common_font_draw_prepare(Evas_Text_Props *text_props)
if (!text_props->changed && text_props->generation == fi->generation && text_props->glyphs)
return;
glyphs = eina_inarray_new(sizeof(Evas_Glyph), 32);
if (text_props->len < unit) unit = text_props->len;
glyphs = eina_inarray_new(sizeof(Evas_Glyph), unit);
evas_common_font_int_reload(fi);
if (fi->src->current_size != fi->size)