From: Cedric BAIL Date: Thu, 19 Oct 2017 23:11:30 +0000 (-0700) Subject: evas: propagate object data to evas_object_inform_call_restack instead of fetching... X-Git-Tag: submit/sandbox/upgrade/efl120/20180319.053334~2123 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8bcd960e7007826263138d626189cc780b4768c8;p=platform%2Fupstream%2Fefl.git evas: propagate object data to evas_object_inform_call_restack instead of fetching it again. --- diff --git a/src/lib/evas/canvas/evas_layer.c b/src/lib/evas/canvas/evas_layer.c index 5295b30..0a8dba6 100644 --- a/src/lib/evas/canvas/evas_layer.c +++ b/src/lib/evas/canvas/evas_layer.c @@ -237,7 +237,7 @@ _efl_canvas_object_efl_gfx_stack_layer_set(Eo *eo_obj, Evas_Object_Protected_Dat evas_object_change(eo_obj, obj); if (obj->clip.clipees) { - evas_object_inform_call_restack(eo_obj); + evas_object_inform_call_restack(eo_obj, obj); return; } evas_object_change(eo_obj, obj); @@ -258,7 +258,7 @@ _efl_canvas_object_efl_gfx_stack_layer_set(Eo *eo_obj, Evas_Object_Protected_Dat _evas_object_layer_set_child(member, obj, l); } } - evas_object_inform_call_restack(eo_obj); + evas_object_inform_call_restack(eo_obj, obj); } EAPI short diff --git a/src/lib/evas/canvas/evas_object_inform.c b/src/lib/evas/canvas/evas_object_inform.c index 3daffaa..e458d4f 100644 --- a/src/lib/evas/canvas/evas_object_inform.c +++ b/src/lib/evas/canvas/evas_object_inform.c @@ -41,9 +41,8 @@ evas_object_inform_call_resize(Evas_Object *eo_obj, Evas_Object_Protected_Data * } void -evas_object_inform_call_restack(Evas_Object *eo_obj) +evas_object_inform_call_restack(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_RESTACK, NULL, event_id, EFL_GFX_EVENT_RESTACK); diff --git a/src/lib/evas/canvas/evas_stack.c b/src/lib/evas/canvas/evas_stack.c index 7cd8509..a42562f 100644 --- a/src/lib/evas/canvas/evas_stack.c +++ b/src/lib/evas/canvas/evas_stack.c @@ -51,7 +51,7 @@ _efl_canvas_object_efl_gfx_stack_raise(Eo *eo_obj, Evas_Object_Protected_Data *o if (!((EINA_INLIST_GET(obj))->next)) { - evas_object_inform_call_restack(eo_obj); + evas_object_inform_call_restack(eo_obj, obj); return; } if (obj->smart.parent) @@ -63,13 +63,13 @@ _efl_canvas_object_efl_gfx_stack_raise(Eo *eo_obj, Evas_Object_Protected_Data *o } if (obj->clip.clipees) { - evas_object_inform_call_restack(eo_obj); + evas_object_inform_call_restack(eo_obj, obj); return; } if (obj->layer) evas_render_invalidate(obj->layer->evas->evas); obj->restack = EINA_TRUE; evas_object_change(eo_obj, obj); - evas_object_inform_call_restack(eo_obj); + evas_object_inform_call_restack(eo_obj, obj); if (!obj->layer || obj->layer->evas->is_frozen) return; if ((!evas_event_passes_through(eo_obj, obj)) && (!evas_event_freezes_through(eo_obj, obj)) && @@ -100,7 +100,7 @@ _efl_canvas_object_efl_gfx_stack_lower(Eo *eo_obj, Evas_Object_Protected_Data *o if (!((EINA_INLIST_GET(obj))->prev)) { - evas_object_inform_call_restack(eo_obj); + evas_object_inform_call_restack(eo_obj, obj); return; } if (obj->smart.parent) @@ -113,13 +113,13 @@ _efl_canvas_object_efl_gfx_stack_lower(Eo *eo_obj, Evas_Object_Protected_Data *o } if (obj->clip.clipees) { - evas_object_inform_call_restack(eo_obj); + evas_object_inform_call_restack(eo_obj, obj); return; } if (obj->layer) evas_render_invalidate(obj->layer->evas->evas); obj->restack = EINA_TRUE; evas_object_change(eo_obj, obj); - evas_object_inform_call_restack(eo_obj); + evas_object_inform_call_restack(eo_obj, obj); if (!obj->layer || obj->layer->evas->is_frozen) return; if ((!evas_event_passes_through(eo_obj, obj)) && (!evas_event_freezes_through(eo_obj, obj)) && @@ -157,7 +157,7 @@ _efl_canvas_object_efl_gfx_stack_stack_above(Eo *eo_obj, Evas_Object_Protected_D Evas_Object_Protected_Data *above = efl_data_scope_get(eo_above, EFL_CANVAS_OBJECT_CLASS); if ((EINA_INLIST_GET(obj))->prev == EINA_INLIST_GET(above)) { - evas_object_inform_call_restack(eo_obj); + evas_object_inform_call_restack(eo_obj, obj); return; } if (obj->smart.parent) @@ -205,13 +205,13 @@ _efl_canvas_object_efl_gfx_stack_stack_above(Eo *eo_obj, Evas_Object_Protected_D } if (obj->clip.clipees) { - evas_object_inform_call_restack(eo_obj); + evas_object_inform_call_restack(eo_obj, obj); return; } if (obj->layer) evas_render_invalidate(obj->layer->evas->evas); obj->restack = EINA_TRUE; evas_object_change(eo_obj, obj); - evas_object_inform_call_restack(eo_obj); + evas_object_inform_call_restack(eo_obj, obj); if (!obj->layer || obj->layer->evas->is_frozen) return; if ((!evas_event_passes_through(eo_obj, obj)) && (!evas_event_freezes_through(eo_obj, obj)) && @@ -247,7 +247,7 @@ _efl_canvas_object_efl_gfx_stack_stack_below(Eo *eo_obj, Evas_Object_Protected_D Evas_Object_Protected_Data *below = efl_data_scope_get(eo_below, EFL_CANVAS_OBJECT_CLASS); if ((EINA_INLIST_GET(obj))->next == EINA_INLIST_GET(below)) { - evas_object_inform_call_restack(eo_obj); + evas_object_inform_call_restack(eo_obj, obj); return; } if (obj->smart.parent) @@ -295,13 +295,13 @@ _efl_canvas_object_efl_gfx_stack_stack_below(Eo *eo_obj, Evas_Object_Protected_D } if (obj->clip.clipees) { - evas_object_inform_call_restack(eo_obj); + evas_object_inform_call_restack(eo_obj, obj); return; } if (obj->layer) evas_render_invalidate(obj->layer->evas->evas); obj->restack = EINA_TRUE; evas_object_change(eo_obj, obj); - evas_object_inform_call_restack(eo_obj); + evas_object_inform_call_restack(eo_obj, obj); if (!obj->layer || obj->layer->evas->is_frozen) return; if ((!evas_event_passes_through(eo_obj, obj)) && (!evas_event_freezes_through(eo_obj, obj)) && diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index 049e707..07358fc 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -1744,7 +1744,7 @@ void evas_object_inform_call_show(Evas_Object *obj, Evas_Object_Protected_Data * void evas_object_inform_call_hide(Evas_Object *obj, Evas_Object_Protected_Data *pd); 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); +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_image_preloaded(Evas_Object *obj); void evas_object_inform_call_image_unloaded(Evas_Object *obj);