cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=33d860f60d9246fc91de702844490dee3d9aa41f
commit 33d860f60d9246fc91de702844490dee3d9aa41f Author: Cedric BAIL <[email protected]> Date: Thu Oct 19 16:14:48 2017 -0700 evas: propagate object data to evas_object_inform_call_changed_size_hints instead of fetching it again. --- src/lib/evas/canvas/evas_object_inform.c | 3 +-- src/lib/evas/canvas/evas_object_main.c | 18 +++++++++--------- src/lib/evas/include/evas_private.h | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_inform.c b/src/lib/evas/canvas/evas_object_inform.c index e458d4f61d..1057cb92e6 100644 --- a/src/lib/evas/canvas/evas_object_inform.c +++ b/src/lib/evas/canvas/evas_object_inform.c @@ -50,9 +50,8 @@ evas_object_inform_call_restack(Evas_Object *eo_obj, Evas_Object_Protected_Data } void -evas_object_inform_call_changed_size_hints(Evas_Object *eo_obj) +evas_object_inform_call_changed_size_hints(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { - Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); int event_id = _evas_object_event_new(); evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL, event_id, EFL_GFX_EVENT_CHANGE_SIZE_HINTS); diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index acc8de92d9..65b1817b4a 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -1617,7 +1617,7 @@ evas_object_size_hint_display_mode_set(Eo *eo_obj, Evas_Display_Mode dispmode) if (obj->size_hints->dispmode == dispmode) return; obj->size_hints->dispmode = dispmode; - evas_object_inform_call_changed_size_hints(eo_obj); + evas_object_inform_call_changed_size_hints(eo_obj, obj); } EOLIAN static Eina_Size2D @@ -1643,7 +1643,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_restricted_min_set(Eo *eo_obj, Evas_Ob if ((obj->size_hints->min.w == sz.w) && (obj->size_hints->min.h == sz.h)) return; obj->size_hints->min = sz; - evas_object_inform_call_changed_size_hints(eo_obj); + evas_object_inform_call_changed_size_hints(eo_obj, obj); } EOLIAN static Eina_Size2D @@ -1684,7 +1684,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_max_set(Eo *eo_obj, Evas_Object_Protec obj->size_hints->max.w = sz.w; obj->size_hints->max.h = sz.h; - evas_object_inform_call_changed_size_hints(eo_obj); + evas_object_inform_call_changed_size_hints(eo_obj, obj); } EAPI void @@ -1719,7 +1719,7 @@ evas_object_size_hint_request_set(Eo *eo_obj, Evas_Coord w, Evas_Coord h) obj->size_hints->request.w = w; obj->size_hints->request.h = h; - evas_object_inform_call_changed_size_hints(eo_obj); + evas_object_inform_call_changed_size_hints(eo_obj, obj); } EOLIAN static Eina_Size2D @@ -1746,7 +1746,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_min_set(Eo *eo_obj, Evas_Object_Protec if ((obj->size_hints->user_min.w == sz.w) && (obj->size_hints->user_min.h == sz.h)) return; obj->size_hints->user_min = sz; - evas_object_inform_call_changed_size_hints(eo_obj); + evas_object_inform_call_changed_size_hints(eo_obj, obj); } EOLIAN static void @@ -1784,7 +1784,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_aspect_set(Eo *eo_obj, Evas_Object_Pro obj->size_hints->aspect.mode = aspect; obj->size_hints->aspect.size = sz; - evas_object_inform_call_changed_size_hints(eo_obj); + evas_object_inform_call_changed_size_hints(eo_obj, obj); } EOLIAN static void @@ -1818,7 +1818,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_align_set(Eo *eo_obj, Evas_Object_Prot obj->size_hints->align.x = x; obj->size_hints->align.y = y; - evas_object_inform_call_changed_size_hints(eo_obj); + evas_object_inform_call_changed_size_hints(eo_obj, obj); } EOLIAN static void @@ -1852,7 +1852,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_weight_set(Eo *eo_obj, Evas_Object_Pro obj->size_hints->weight.x = x; obj->size_hints->weight.y = y; - evas_object_inform_call_changed_size_hints(eo_obj); + evas_object_inform_call_changed_size_hints(eo_obj, obj); } EOLIAN static void @@ -1889,7 +1889,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_margin_set(Eo *eo_obj, Evas_Object_Pro obj->size_hints->padding.t = t; obj->size_hints->padding.b = b; - evas_object_inform_call_changed_size_hints(eo_obj); + evas_object_inform_call_changed_size_hints(eo_obj, obj); } EAPI void diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index 07358fcc26..bc7c1f9aba 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -1745,7 +1745,7 @@ void evas_object_inform_call_hide(Evas_Object *obj, Evas_Object_Protected_Data * void evas_object_inform_call_move(Evas_Object *obj, Evas_Object_Protected_Data *pd); void evas_object_inform_call_resize(Evas_Object *obj, Evas_Object_Protected_Data *pd); void evas_object_inform_call_restack(Evas_Object *obj, Evas_Object_Protected_Data *pd); -void evas_object_inform_call_changed_size_hints(Evas_Object *obj); +void evas_object_inform_call_changed_size_hints(Evas_Object *obj, Evas_Object_Protected_Data *pd); void evas_object_inform_call_image_preloaded(Evas_Object *obj); void evas_object_inform_call_image_unloaded(Evas_Object *obj); void evas_object_inform_call_image_resize(Evas_Object *obj); --
