summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-12-23 11:02:50 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-12-23 11:02:50 +0000
commitff3a370b9b7a996a53d795d52184516b2289960d (patch)
tree31e20e7d1c94c6a2e808eaad0769bb66b1c39438 /src
parent55f2e872010fbb539282fc26088f9a37ec36462a (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/common/evas_font_draw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/evas/common/evas_font_draw.c b/src/lib/evas/common/evas_font_draw.c
index 8bc57a3c50..f7c5682e25 100644
--- a/src/lib/evas/common/evas_font_draw.c
+++ b/src/lib/evas/common/evas_font_draw.c
@@ -404,6 +404,7 @@ evas_common_font_draw_prepare(Evas_Text_Props *text_props)
404 RGBA_Font_Int *fi; 404 RGBA_Font_Int *fi;
405 RGBA_Font_Glyph *fg; 405 RGBA_Font_Glyph *fg;
406 Eina_Inarray *glyphs; 406 Eina_Inarray *glyphs;
407 size_t unit = 32;
407 EVAS_FONT_WALK_TEXT_INIT(); 408 EVAS_FONT_WALK_TEXT_INIT();
408 409
409 fi = text_props->font_instance; 410 fi = text_props->font_instance;
@@ -412,7 +413,8 @@ evas_common_font_draw_prepare(Evas_Text_Props *text_props)
412 if (!text_props->changed && text_props->generation == fi->generation && text_props->glyphs) 413 if (!text_props->changed && text_props->generation == fi->generation && text_props->glyphs)
413 return; 414 return;
414 415
415 glyphs = eina_inarray_new(sizeof(Evas_Glyph), 32); 416 if (text_props->len < unit) unit = text_props->len;
417 glyphs = eina_inarray_new(sizeof(Evas_Glyph), unit);
416 evas_common_font_int_reload(fi); 418 evas_common_font_int_reload(fi);
417 419
418 if (fi->src->current_size != fi->size) 420 if (fi->src->current_size != fi->size)