summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-10-25 00:29:48 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-10-26 15:35:00 +0100
commit2098f55ba2665e007d5d888f2739f97658fac9ae (patch)
treeed420bc0f98165ab0f52d7a9f68705d83244b144
parent9aeedc5a1c68a5e28dcd12db5ee1856b33e19e45 (diff)
evas - remove excess data scope lookup during render when getting changed
getting smart changed meant another scope data get when we already had the protected data in the caller. don't do that and just pass down. saves a lot of overhead... @optimize
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c7
-rw-r--r--src/lib/evas/canvas/evas_render.c6
-rw-r--r--src/lib/evas/include/evas_private.h2
3 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index 11d8feb8cb..7f0daf7331 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -1225,9 +1225,8 @@ _efl_canvas_group_group_change(Eo *eo_obj, Evas_Smart_Data *o EINA_UNUSED)
1225} 1225}
1226 1226
1227Eina_Bool 1227Eina_Bool
1228evas_object_smart_changed_get(Evas_Object *eo_obj) 1228evas_object_smart_changed_get(Evas_Object_Protected_Data *obj)
1229{ 1229{
1230 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
1231 Eina_Bool has_map = EINA_FALSE; 1230 Eina_Bool has_map = EINA_FALSE;
1232 1231
1233 /* If object is invisible, it's meaningless to figure out changed state 1232 /* If object is invisible, it's meaningless to figure out changed state
@@ -1263,8 +1262,8 @@ evas_object_smart_changed_get(Evas_Object *eo_obj)
1263 { 1262 {
1264 Evas_Object_Protected_Data *o2; 1263 Evas_Object_Protected_Data *o2;
1265 1264
1266 EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), o2) 1265 EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj->object), o2)
1267 if (evas_object_smart_changed_get(o2->object)) return EINA_TRUE; 1266 if (evas_object_smart_changed_get(o2)) return EINA_TRUE;
1268 } 1267 }
1269 1268
1270 return EINA_FALSE; 1269 return EINA_FALSE;
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index cbd13d315b..e4d76ed710 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -407,7 +407,7 @@ static inline Eina_Bool
407_evas_render_object_changed_get(Evas_Object_Protected_Data *obj) 407_evas_render_object_changed_get(Evas_Object_Protected_Data *obj)
408{ 408{
409 if (obj->smart.smart) 409 if (obj->smart.smart)
410 return evas_object_smart_changed_get(obj->object); 410 return evas_object_smart_changed_get(obj);
411 else 411 else
412 return obj->changed; 412 return obj->changed;
413} 413}
@@ -469,7 +469,7 @@ _evas_render_phase1_direct(Evas_Public_Data *e,
469 if (obj->proxy->redraw || obj->mask->redraw) 469 if (obj->proxy->redraw || obj->mask->redraw)
470 _evas_render_prev_cur_clip_cache_add(e, obj); 470 _evas_render_prev_cur_clip_cache_add(e, obj);
471 471
472 if (!obj->smart.smart || evas_object_smart_changed_get(eo_obj)) 472 if (!obj->smart.smart || evas_object_smart_changed_get(obj))
473 { 473 {
474 /* proxy sources */ 474 /* proxy sources */
475 if (obj->proxy->proxies || obj->proxy->proxy_textures) 475 if (obj->proxy->proxies || obj->proxy->proxy_textures)
@@ -1926,7 +1926,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
1926 changed = EINA_TRUE; 1926 changed = EINA_TRUE;
1927 } 1927 }
1928 1928
1929 if (!changed) changed = evas_object_smart_changed_get(eo_obj); 1929 if (!changed) changed = evas_object_smart_changed_get(obj);
1930 1930
1931 /* mark the old map as invalid, so later we don't reuse it as a 1931 /* mark the old map as invalid, so later we don't reuse it as a
1932 * cache. */ 1932 * cache. */
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index cc927afef0..aad7c2f5c3 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1608,7 +1608,7 @@ void _evas_object_smart_clipped_smart_move_internal(Evas_Object *eo_obj, Evas_Co
1608void evas_call_smarts_calculate(Evas *e); 1608void evas_call_smarts_calculate(Evas *e);
1609void evas_object_smart_bounding_box_update(Evas_Object_Protected_Data *obj); 1609void evas_object_smart_bounding_box_update(Evas_Object_Protected_Data *obj);
1610void evas_object_smart_need_bounding_box_update(Evas_Smart_Data *o, Evas_Object_Protected_Data *obj); 1610void evas_object_smart_need_bounding_box_update(Evas_Smart_Data *o, Evas_Object_Protected_Data *obj);
1611Eina_Bool evas_object_smart_changed_get(Evas_Object *eo_obj); 1611Eina_Bool evas_object_smart_changed_get(Evas_Object_Protected_Data *obj);
1612void evas_object_smart_attach(Evas_Object *eo_obj, Evas_Smart *s); 1612void evas_object_smart_attach(Evas_Object *eo_obj, Evas_Smart *s);
1613void _evas_post_event_callback_call_real(Evas *e, Evas_Public_Data* e_pd, int min_event_id); 1613void _evas_post_event_callback_call_real(Evas *e, Evas_Public_Data* e_pd, int min_event_id);
1614#define _evas_post_event_callback_call(e, pd, id) do { \ 1614#define _evas_post_event_callback_call(e, pd, id) do { \