efl/font: Dispatch font load request once sent to server

Patch by: Paulo Alcantara <pcacjr@profusion.mobi>


SVN revision: 82482
This commit is contained in:
Paulo Alcantara 2013-01-09 21:37:34 +00:00 committed by Ulisses Furquim
parent c6f907a9f4
commit cf46337e17
3 changed files with 16 additions and 7 deletions

View File

@ -347,8 +347,12 @@ evas_common_font_int_memory_load(const char *source, const char *name, int size,
evas_common_font_int_load_complete(fi);
#ifdef EVAS_CSERVE2
if (evas_cserve2_use_get())
fi->cs2_handler = evas_cserve2_font_load(source, name, size, font_dpi,
wanted_rend);
{
fi->cs2_handler = evas_cserve2_font_load(source, name, size, font_dpi,
wanted_rend);
if (fi->cs2_handler)
evas_cserve2_font_load_wait((Font_Entry *)fi->cs2_handler);
}
#endif
free(fake_name);
return fi;
@ -379,8 +383,12 @@ evas_common_font_int_load(const char *name, int size,
fi = evas_common_font_int_load_init(fi);
#ifdef EVAS_CSERVE2
if (evas_cserve2_use_get())
fi->cs2_handler = evas_cserve2_font_load(NULL, name, size, font_dpi,
wanted_rend);
{
fi->cs2_handler = evas_cserve2_font_load(NULL, name, size, font_dpi,
wanted_rend);
if (fi->cs2_handler)
evas_cserve2_font_load_wait((Font_Entry *)fi->cs2_handler);
}
#endif
// evas_common_font_int_load_complete(fi);
return fi;

View File

@ -993,8 +993,8 @@ evas_cserve2_font_load(const char *source, const char *name, int size, int dpi,
return fe;
}
static inline int
_font_load_wait(Font_Entry *fe)
int
evas_cserve2_font_load_wait(Font_Entry *fe)
{
_server_dispatch_until(fe->rid);
@ -1010,7 +1010,7 @@ evas_cserve2_font_free(Font_Entry *fe)
if (!fe) return;
ret = _font_load_wait(fe);
ret = evas_cserve2_font_load_wait(fe);
if (ret == CSERVE2_GENERIC)
{
ERR("Failed to wait loading font '%s'.", fe->name);

View File

@ -35,6 +35,7 @@ void evas_cserve2_dispatch(void);
void *evas_cserve2_image_data_get(Image_Entry *ie);
Font_Entry *evas_cserve2_font_load(const char *source, const char *name, int size, int dpi, Font_Rend_Flags wanted_rend);
EAPI int evas_cserve2_font_load_wait(Font_Entry *fe);
void evas_cserve2_font_free(Font_Entry *fe);
Eina_Bool evas_cserve2_font_glyph_request(Font_Entry *fe, unsigned int idx, Font_Hint_Flags hints);
Eina_Bool evas_cserve2_font_glyph_used(Font_Entry *fe, unsigned int idx, Font_Hint_Flags hints);