summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangHyeon Jade Lee <sh10233.lee@samsung.com>2020-02-24 08:52:09 -0500
committerMike Blumenkrantz <zmike@samsung.com>2020-02-24 08:52:09 -0500
commit9cfb9aa603776464ade05be1846df56256975525 (patch)
tree110f7526bb5e1e9dded754e80daccaf47a09641f
parent9dfcd5f9ecc9f26c882c1314d2a30b1b5fe2d29e (diff)
elm : move unrealize callback call before the content caching.
Summary: item edje and contents are cached for performance improvement in genlist & gengrid. but to provide elm_genlist(gengrid)_all_contents_unset method before the contents are being cached, unrealize callback must be come before the unrealize process. currently, item_unrealize 1.unrealize process 2.contents cached 3.unrealize callback 4.all_contents_unset : nothing to unset in the item. by this patch, item_unrealize 1.unrealize callback 2.all_contents_unset : contents are unset. 3.unrealize process 4.contents(null) cached Reviewers: bu5hm4n, cedric, eagleeye, zmike Reviewed By: zmike Subscribers: zmike, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11402
-rw-r--r--src/lib/elementary/elm_gengrid.c5
-rw-r--r--src/lib/elementary/elm_genlist.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index df46609880..8a5bccaa2f 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -1261,12 +1261,13 @@ _elm_gengrid_item_unrealize(Elm_Gen_Item *it,
1261 ELM_SAFE_FREE(it->states, elm_widget_stringlist_free); 1261 ELM_SAFE_FREE(it->states, elm_widget_stringlist_free);
1262 elm_wdg_item_track_cancel(EO_OBJ(it)); 1262 elm_wdg_item_track_cancel(EO_OBJ(it));
1263 1263
1264 if (!calc)
1265 efl_event_callback_legacy_call(WIDGET(it), ELM_GENGRID_EVENT_UNREALIZED, EO_OBJ(it));
1266
1264 it->unrealize_cb(it); 1267 it->unrealize_cb(it);
1265 1268
1266 it->realized = EINA_FALSE; 1269 it->realized = EINA_FALSE;
1267 it->want_unrealize = EINA_FALSE; 1270 it->want_unrealize = EINA_FALSE;
1268 if (!calc)
1269 efl_event_callback_legacy_call(WIDGET(it), ELM_GENGRID_EVENT_UNREALIZED, EO_OBJ(it));
1270 1271
1271 { 1272 {
1272 ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd); 1273 ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd);
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 3c586ca1e2..5da1517fc8 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -715,10 +715,11 @@ _elm_genlist_item_unrealize(Elm_Gen_Item *it,
715 715
716 elm_wdg_item_track_cancel(EO_OBJ(it)); 716 elm_wdg_item_track_cancel(EO_OBJ(it));
717 717
718 _item_unrealize(it);
719 if (!calc) 718 if (!calc)
720 efl_event_callback_legacy_call(WIDGET(it), ELM_GENLIST_EVENT_UNREALIZED, EO_OBJ(it)); 719 efl_event_callback_legacy_call(WIDGET(it), ELM_GENLIST_EVENT_UNREALIZED, EO_OBJ(it));
721 720
721 _item_unrealize(it);
722
722 evas_event_thaw(e); 723 evas_event_thaw(e);
723 evas_event_thaw_eval(e); 724 evas_event_thaw_eval(e);
724} 725}