edje: improve loading time of Edje_Object with Evas_Object_Textblock and multiple styles.
This bring you a 10% speedup to the first frame of Elementary_Test.
This commit is contained in:
parent
6c1833246c
commit
072f73a453
|
@ -1,3 +1,7 @@
|
||||||
|
2013-08-01 Cedric Bail
|
||||||
|
|
||||||
|
* Edje: faster load time for Edje_Object using Evas_Object_Textblocks and many styles.
|
||||||
|
|
||||||
2013-07-31 Carsten Haitzler (The Rasterman)
|
2013-07-31 Carsten Haitzler (The Rasterman)
|
||||||
|
|
||||||
* Fix efl to use key not keyname (so xmodmap works).
|
* Fix efl to use key not keyname (so xmodmap works).
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -124,6 +124,7 @@ Additions:
|
||||||
- support edc proxy.source_visible, proxy.source_clip
|
- support edc proxy.source_visible, proxy.source_clip
|
||||||
- support edc map color set
|
- support edc map color set
|
||||||
- Add threshold support to Edje draggable part.
|
- Add threshold support to Edje draggable part.
|
||||||
|
- Reduce load time of Edje_Object using Evas_Object_Textblock and many styles.
|
||||||
* Eeze:
|
* Eeze:
|
||||||
- Add a dummy libmount replacement for when libmount is not there.
|
- Add a dummy libmount replacement for when libmount is not there.
|
||||||
* Ecore_Con:
|
* Ecore_Con:
|
||||||
|
|
|
@ -462,6 +462,7 @@ struct _Edje_File
|
||||||
Edje_External_Directory *external_dir;
|
Edje_External_Directory *external_dir;
|
||||||
Edje_Image_Directory *image_dir;
|
Edje_Image_Directory *image_dir;
|
||||||
Edje_Sound_Directory *sound_dir;
|
Edje_Sound_Directory *sound_dir;
|
||||||
|
|
||||||
Eina_List *styles;
|
Eina_List *styles;
|
||||||
|
|
||||||
Eina_List *color_classes;
|
Eina_List *color_classes;
|
||||||
|
@ -501,6 +502,8 @@ struct _Edje_Style
|
||||||
char *name;
|
char *name;
|
||||||
Eina_List *tags;
|
Eina_List *tags;
|
||||||
Evas_Textblock_Style *style;
|
Evas_Textblock_Style *style;
|
||||||
|
|
||||||
|
Eina_Bool cache;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Edje_Style_Tag
|
struct _Edje_Style_Tag
|
||||||
|
|
|
@ -173,6 +173,9 @@ _edje_textblock_style_all_update(Edje *ed)
|
||||||
/* Make sure the style is already defined */
|
/* Make sure the style is already defined */
|
||||||
if (!stl->style) break;
|
if (!stl->style) break;
|
||||||
|
|
||||||
|
/* No need to compute it again and again and again */
|
||||||
|
if (stl->cache) continue;
|
||||||
|
|
||||||
/* Make sure the style contains a text_class */
|
/* Make sure the style contains a text_class */
|
||||||
EINA_LIST_FOREACH(stl->tags, ll, tag)
|
EINA_LIST_FOREACH(stl->tags, ll, tag)
|
||||||
{
|
{
|
||||||
|
@ -257,6 +260,7 @@ _edje_textblock_style_all_update(Edje *ed)
|
||||||
if (fontsource) free(fontsource);
|
if (fontsource) free(fontsource);
|
||||||
|
|
||||||
/* Configure the style */
|
/* Configure the style */
|
||||||
|
stl->cache = EINA_TRUE;
|
||||||
evas_textblock_style_set(stl->style, eina_strbuf_string_get(txt));
|
evas_textblock_style_set(stl->style, eina_strbuf_string_get(txt));
|
||||||
eina_strbuf_reset(txt);
|
eina_strbuf_reset(txt);
|
||||||
}
|
}
|
||||||
|
@ -401,18 +405,16 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
|
||||||
void
|
void
|
||||||
_edje_textblock_style_cleanup(Edje_File *edf)
|
_edje_textblock_style_cleanup(Edje_File *edf)
|
||||||
{
|
{
|
||||||
while (edf->styles)
|
Edje_Style *stl;
|
||||||
{
|
|
||||||
Edje_Style *stl;
|
|
||||||
|
|
||||||
stl = edf->styles->data;
|
EINA_LIST_FREE(edf->styles, stl)
|
||||||
edf->styles = eina_list_remove_list(edf->styles, edf->styles);
|
{
|
||||||
while (stl->tags)
|
Edje_Style_Tag *tag;
|
||||||
|
|
||||||
|
EINA_LIST_FREE(stl->tags, tag)
|
||||||
{
|
{
|
||||||
Edje_Style_Tag *tag;
|
Edje_Style_Tag *tag;
|
||||||
|
|
||||||
tag = stl->tags->data;
|
|
||||||
stl->tags = eina_list_remove_list(stl->tags, stl->tags);
|
|
||||||
if (tag->value && eet_dictionary_string_check(eet_dictionary_get(edf->ef), tag->value) == 0)
|
if (tag->value && eet_dictionary_string_check(eet_dictionary_get(edf->ef), tag->value) == 0)
|
||||||
eina_stringshare_del(tag->value);
|
eina_stringshare_del(tag->value);
|
||||||
if (edf->free_strings)
|
if (edf->free_strings)
|
||||||
|
|
Loading…
Reference in New Issue