summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaulo Alcantara <pcacjr@profusion.mobi>2012-12-21 21:11:23 +0000
committerLeandro Pereira <leandro@profusion.mobi>2012-12-21 21:11:23 +0000
commitfb97c82882a46225886204109880cac4f8704340 (patch)
tree251705597c14ccddca30b9a0efd88a176253b1ba /src
parentda061849b0e00a50d4796f9a8a4fd46f2a2b9489 (diff)
efl/cserve2: Fix some bugs regarding fonts
Signed-off-by: Paulo Alcantara <pcacjr@profusion.mobi> SVN revision: 81582
Diffstat (limited to 'src')
-rw-r--r--src/bin/evas/evas_cserve2_cache.c8
-rw-r--r--src/lib/evas/cserve2/evas_cs2_client.c20
2 files changed, 22 insertions, 6 deletions
diff --git a/src/bin/evas/evas_cserve2_cache.c b/src/bin/evas/evas_cserve2_cache.c
index a969b94f18..2264d09f23 100644
--- a/src/bin/evas/evas_cserve2_cache.c
+++ b/src/bin/evas/evas_cserve2_cache.c
@@ -991,10 +991,10 @@ _entry_free_cb(void *data)
991static void 991static void
992_font_entry_reference_del(Client *client, Font_Entry *fe) 992_font_entry_reference_del(Client *client, Font_Entry *fe)
993{ 993{
994 Eina_List *l; 994 Eina_List *l, *l_next;
995 Reference *ref; 995 Reference *ref;
996 996
997 EINA_LIST_FOREACH(client->fonts.referencing, l, ref) 997 EINA_LIST_FOREACH_SAFE(client->fonts.referencing, l, l_next, ref)
998 { 998 {
999 if (ref->entry == (Entry *)fe) 999 if (ref->entry == (Entry *)fe)
1000 { 1000 {
@@ -1203,12 +1203,12 @@ _font_load_request_response(Font_Entry *fe, Slave_Msg_Font_Loaded *msg, int *siz
1203static void 1203static void
1204_font_load_request_failed(Font_Entry *fe, Error_Type error EINA_UNUSED) 1204_font_load_request_failed(Font_Entry *fe, Error_Type error EINA_UNUSED)
1205{ 1205{
1206 Eina_List *l; 1206 Eina_List *l, *l_next;
1207 Reference *ref; 1207 Reference *ref;
1208 1208
1209 if (fe->base.request) fe->base.request = NULL; 1209 if (fe->base.request) fe->base.request = NULL;
1210 1210
1211 EINA_LIST_FOREACH(fe->base.references, l, ref) 1211 EINA_LIST_FOREACH_SAFE(fe->base.references, l, l_next, ref)
1212 _font_entry_reference_del(ref->client, fe); 1212 _font_entry_reference_del(ref->client, fe);
1213} 1213}
1214 1214
diff --git a/src/lib/evas/cserve2/evas_cs2_client.c b/src/lib/evas/cserve2/evas_cs2_client.c
index 34879bbdd1..7748aca5f1 100644
--- a/src/lib/evas/cserve2/evas_cs2_client.c
+++ b/src/lib/evas/cserve2/evas_cs2_client.c
@@ -993,13 +993,29 @@ evas_cserve2_font_load(const char *source, const char *name, int size, int dpi,
993 return fe; 993 return fe;
994} 994}
995 995
996static inline int
997_font_load_wait(Font_Entry *fe)
998{
999 _server_dispatch_until(fe->rid);
1000
1001 if (fe->failed) return CSERVE2_GENERIC;
1002
1003 return CSERVE2_NONE;
1004}
1005
996void 1006void
997evas_cserve2_font_free(Font_Entry *fe) 1007evas_cserve2_font_free(Font_Entry *fe)
998{ 1008{
1009 int ret;
1010
999 if (!fe) return; 1011 if (!fe) return;
1000 1012
1001 if (fe->failed) 1013 ret = _font_load_wait(fe);
1002 return; 1014 if (ret == CSERVE2_GENERIC)
1015 {
1016 ERR("Failed to wait loading font '%s'.", fe->name);
1017 return;
1018 }
1003 1019
1004 _font_load_server_send(fe, CSERVE2_FONT_UNLOAD); 1020 _font_load_server_send(fe, CSERVE2_FONT_UNLOAD);
1005 1021