summaryrefslogtreecommitdiff
path: root/src/lib/evas/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/common')
-rw-r--r--src/lib/evas/common/evas_font_draw.c24
-rw-r--r--src/lib/evas/common/evas_font_main.c3
2 files changed, 14 insertions, 13 deletions
diff --git a/src/lib/evas/common/evas_font_draw.c b/src/lib/evas/common/evas_font_draw.c
index 02f681c93f..3a999ff23f 100644
--- a/src/lib/evas/common/evas_font_draw.c
+++ b/src/lib/evas/common/evas_font_draw.c
@@ -346,12 +346,16 @@ evas_common_font_draw_prepare(Evas_Text_Props *text_props)
346 346
347 fg = evas_common_font_int_cache_glyph_get(fi, idx); 347 fg = evas_common_font_int_cache_glyph_get(fi, idx);
348 if (!fg) continue; 348 if (!fg) continue;
349 if (!fg->glyph_out) 349 if (!evas_common_font_int_cache_glyph_render(fg))
350 if (!evas_common_font_int_cache_glyph_render(fg)) 350 {
351 { 351 fg = NULL;
352 fg = NULL; 352 goto error;
353 goto error; 353 }
354 } 354
355#ifdef EVAS_CSERVE2
356 if (evas_cserve2_use_get())
357 evas_cserve2_font_glyph_ref(fg->glyph_out, EINA_TRUE);
358#endif
355 359
356 glyph = eina_inarray_grow(glyphs, 1); 360 glyph = eina_inarray_grow(glyphs, 1);
357 if (!glyph) goto error; 361 if (!glyph) goto error;
@@ -360,11 +364,6 @@ evas_common_font_draw_prepare(Evas_Text_Props *text_props)
360 glyph->idx = idx; 364 glyph->idx = idx;
361 glyph->coord.x = EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + EVAS_FONT_WALK_X_BEAR; 365 glyph->coord.x = EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + EVAS_FONT_WALK_X_BEAR;
362 glyph->coord.y = EVAS_FONT_WALK_PEN_Y + EVAS_FONT_WALK_Y_OFF + EVAS_FONT_WALK_Y_BEAR; 366 glyph->coord.y = EVAS_FONT_WALK_PEN_Y + EVAS_FONT_WALK_Y_OFF + EVAS_FONT_WALK_Y_BEAR;
363
364#ifdef EVAS_CSERVE2
365 if (reused_glyphs && evas_cserve2_use_get())
366 evas_cserve2_font_glyph_ref(glyph->fg->glyph_out, EINA_TRUE);
367#endif
368 } 367 }
369 EVAS_FONT_WALK_TEXT_END(); 368 EVAS_FONT_WALK_TEXT_END();
370 369
@@ -374,11 +373,10 @@ evas_common_font_draw_prepare(Evas_Text_Props *text_props)
374 373
375 text_props->glyphs = malloc(sizeof(*text_props->glyphs)); 374 text_props->glyphs = malloc(sizeof(*text_props->glyphs));
376 if (!text_props->glyphs) goto error; 375 if (!text_props->glyphs) goto error;
377 text_props->glyphs->refcount = 0; 376 text_props->glyphs->refcount = 1;
378 text_props->glyphs->array = glyphs; 377 text_props->glyphs->array = glyphs;
379 text_props->glyphs->fi = fi; 378 text_props->glyphs->fi = fi;
380 fi->references++; 379 fi->references++;
381 evas_common_font_glyphs_ref(text_props->glyphs);
382 } 380 }
383 381
384 /* check if there's a request queue in fi, if so ask cserve2 to render 382 /* check if there's a request queue in fi, if so ask cserve2 to render
diff --git a/src/lib/evas/common/evas_font_main.c b/src/lib/evas/common/evas_font_main.c
index 769114a478..8bc9e68243 100644
--- a/src/lib/evas/common/evas_font_main.c
+++ b/src/lib/evas/common/evas_font_main.c
@@ -560,6 +560,9 @@ evas_common_font_int_cache_glyph_render(RGBA_Font_Glyph *fg)
560#endif 560#endif
561 561
562 /* no cserve2 case */ 562 /* no cserve2 case */
563 if (fg->glyph_out)
564 return EINA_TRUE;
565
563 FTLOCK(); 566 FTLOCK();
564 error = FT_Glyph_To_Bitmap(&(fg->glyph), FT_RENDER_MODE_NORMAL, 0, 1); 567 error = FT_Glyph_To_Bitmap(&(fg->glyph), FT_RENDER_MODE_NORMAL, 0, 1);
565 if (error) 568 if (error)