forked from enlightenment/efl
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:
parent
862a460e7f
commit
1e079a7568
|
@ -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 *
|
||||
|
|
Loading…
Reference in New Issue