summaryrefslogtreecommitdiff
path: root/src/lib/evas/common
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-10-02 20:23:14 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-10-28 15:47:16 +0900
commite74cac57e412bcd71f2cc58ba46d326aef0996c4 (patch)
tree3ef14985f93e18bbb642aa537562e648ba01e77b /src/lib/evas/common
parent3889feca24ad3dba2aead16261a6b8dde0687b57 (diff)
evas/cserve2: Reconnect to cserve2 in case of server crash
Try to reconnect to cserve2 if the socket connection was lost. Resend some messages if necessary. Images reload seems to be working. Actually, the images don't change over time, so the clients just keep the previous references to their images. FONT RELOAD IS NOT WORKING: - Crashes - Invalid glyph data - Infinite loop in _glyph_map_remap_check() Root cause: When new glyphs are requested from the server, they are added to the mempool. So it is necessary to remap the font. Unfortunately, in case of server reboot, we did not keep the mempool so the old glyphs that were not requested again will not be valid.
Diffstat (limited to 'src/lib/evas/common')
-rw-r--r--src/lib/evas/common/evas_font_draw.c7
-rw-r--r--src/lib/evas/common/evas_font_main.c10
2 files changed, 14 insertions, 3 deletions
diff --git a/src/lib/evas/common/evas_font_draw.c b/src/lib/evas/common/evas_font_draw.c
index 5b8423db83..2b8203597a 100644
--- a/src/lib/evas/common/evas_font_draw.c
+++ b/src/lib/evas/common/evas_font_draw.c
@@ -304,7 +304,12 @@ evas_common_font_draw_prepare(Evas_Text_Props *text_props)
304 304
305 fg = evas_common_font_int_cache_glyph_get(fi, idx); 305 fg = evas_common_font_int_cache_glyph_get(fi, idx);
306 if (!fg) continue; 306 if (!fg) continue;
307 if (!fg->glyph_out) evas_common_font_int_cache_glyph_render(fg); 307 if (!fg->glyph_out)
308 if (!evas_common_font_int_cache_glyph_render(fg))
309 {
310 fg = NULL;
311 goto error;
312 }
308 313
309 glyph = eina_inarray_grow(glyphs, 1); 314 glyph = eina_inarray_grow(glyphs, 1);
310 if (!glyph) goto error; 315 if (!glyph) goto error;
diff --git a/src/lib/evas/common/evas_font_main.c b/src/lib/evas/common/evas_font_main.c
index 32c7e379b1..769114a478 100644
--- a/src/lib/evas/common/evas_font_main.c
+++ b/src/lib/evas/common/evas_font_main.c
@@ -548,8 +548,14 @@ evas_common_font_int_cache_glyph_render(RGBA_Font_Glyph *fg)
548 fg->glyph_out = evas_cserve2_font_glyph_bitmap_get(fi->cs2_handler, 548 fg->glyph_out = evas_cserve2_font_glyph_bitmap_get(fi->cs2_handler,
549 fg->index, 549 fg->index,
550 fg->fi->hinting); 550 fg->fi->hinting);
551 if (fg->glyph_out) 551 if (!fg->glyph_out)
552 return EINA_TRUE; 552 {
553 if (!fi->fash) fi->fash = _fash_gl_new();
554 if (fi->fash) _fash_gl_add(fi->fash, fg->index, (void *)(-1));
555 free(fg);
556 return EINA_FALSE;
557 }
558 return EINA_TRUE;
553 } 559 }
554#endif 560#endif
555 561