edje/style: Enable lazy computaion of styles.

Summary:
Instead of updating all the styles in an Edje_File just mark them
dirty so that subsequent  call to style will recompute the new style before
returning the style.

Reviewers: ali.alzyod, Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9697
This commit is contained in:
subhransu mohanty 2019-08-23 11:11:05 +09:00 committed by Hermet Park
parent 862a460e7f
commit 1e079a7568
1 changed files with 6 additions and 2 deletions

View File

@ -219,7 +219,11 @@ _edje_textblock_style_update(Edje *ed, Edje_Style *stl, Eina_Bool force)
eina_strbuf_free(txt);
}
/* Update all evas_styles which are in an edje
/*
* mark all the styles in the Edje_File dirty (except readonly styles)so that
* subsequent request to style will update before giving the style.
* Note: this will enable lazy style computation (only when some
* widget request for new style it will get computed).
*
* @param ed The edje containing styles which need to be updated
*/
@ -232,7 +236,7 @@ _edje_textblock_style_all_update(Edje *ed)
if (!ed->file) return;
EINA_LIST_FOREACH(ed->file->styles, l, stl)
_edje_textblock_style_update(ed, stl, EINA_FALSE);
if (stl && !stl->readonly) stl->cache = EINA_FALSE;
}
static inline Edje_Style *