forked from enlightenment/efl
* Evas: Add another delay before reducing number of unused font in the
cache. Note: This is usefull when you are scaling up and down a font during an animation. SVN revision: 41049
This commit is contained in:
parent
f63beb3edf
commit
fdca8644a2
|
@ -120,16 +120,34 @@ evas_fonts_zero_free(Evas *evas)
|
|||
{
|
||||
Fndat *fd;
|
||||
|
||||
while (fonts_zero)
|
||||
EINA_LIST_FREE(fonts_zero, fd)
|
||||
{
|
||||
if (fd->name) eina_stringshare_del(fd->name);
|
||||
if (fd->source) eina_stringshare_del(fd->source);
|
||||
evas->engine.func->font_free(evas->engine.data.output, fd->font);
|
||||
free(fd);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
evas_fonts_zero_presure(Evas *evas)
|
||||
{
|
||||
Fndat *fd;
|
||||
|
||||
while (fonts_zero
|
||||
&& eina_list_count(fonts_zero) > 4) /* 4 is arbitrary */
|
||||
{
|
||||
fd = eina_list_data_get(fonts_zero);
|
||||
|
||||
if (fd->ref != 0) break;
|
||||
fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero);
|
||||
|
||||
if (fd->name) eina_stringshare_del(fd->name);
|
||||
if (fd->source) eina_stringshare_del(fd->source);
|
||||
evas->engine.func->font_free(evas->engine.data.output, fd->font);
|
||||
free(fd);
|
||||
|
||||
fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero);
|
||||
if (eina_list_count(fonts_zero) < 5) break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,16 +170,20 @@ evas_font_free(Evas *evas, void *font)
|
|||
break;
|
||||
}
|
||||
}
|
||||
while ((fonts_zero) &&
|
||||
(eina_list_count(fonts_zero) > 4)) /* 4 is arbitrary */
|
||||
while (fonts_zero
|
||||
&& eina_list_count(fonts_zero) > 42) /* 42 is arbitrary */
|
||||
{
|
||||
fd = eina_list_data_get(fonts_zero);
|
||||
|
||||
if (fd->ref != 0) break;
|
||||
fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero);
|
||||
|
||||
if (fd->name) eina_stringshare_del(fd->name);
|
||||
if (fd->source) eina_stringshare_del(fd->source);
|
||||
evas->engine.func->font_free(evas->engine.data.output, fd->font);
|
||||
free(fd);
|
||||
|
||||
if (eina_list_count(fonts_zero) < 43) break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -667,6 +667,8 @@ evas_render_idle_flush(Evas *e)
|
|||
return;
|
||||
MAGIC_CHECK_END();
|
||||
|
||||
evas_fonts_zero_presure(e);
|
||||
|
||||
if ((e->engine.func) && (e->engine.func->output_idle_flush) &&
|
||||
(e->engine.data.output))
|
||||
e->engine.func->output_idle_flush(e->engine.data.output);
|
||||
|
|
|
@ -780,6 +780,7 @@ Eina_List *evas_font_dir_available_list(const Evas* evas);
|
|||
void evas_font_dir_available_list_free(Eina_List *available);
|
||||
void evas_font_free(Evas *evas, void *font);
|
||||
void evas_fonts_zero_free(Evas *evas);
|
||||
void evas_fonts_zero_presure(Evas *evas);
|
||||
void *evas_font_load(Evas *evas, const char *name, const char *source, int size);
|
||||
void evas_font_load_hinting_set(Evas *evas, void *font, int hinting);
|
||||
void evas_object_smart_member_cache_invalidate(Evas_Object *obj);
|
||||
|
|
Loading…
Reference in New Issue