evas: Avoid call to EAPI inside internal code
authorJean-Philippe Andre <jp.andre@samsung.com>
Mon, 20 Feb 2017 08:25:29 +0000 (17:25 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 21 Feb 2017 01:52:39 +0000 (10:52 +0900)
This avoids calling efl_isa and locking the async mutex.

In callgrind analysis, this reduces the count of calls to
efl_isa from 1.96M to 1.02M.

@optimization

src/lib/evas/canvas/evas_object_main.c

index c650876..77cc16b 100644 (file)
@@ -1142,12 +1142,12 @@ _efl_canvas_object_efl_gfx_position_set(Eo *eo_obj, Evas_Object_Protected_Data *
    Eina_Bool pass = EINA_FALSE, freeze = EINA_FALSE;
    Eina_Bool source_invisible = EINA_FALSE;
    Eina_List *was = NULL;
+   Evas_Map *map;
 
    if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 1, x, y))
      return;
 
-   Evas_Map *map;
-   map = (Evas_Map *) evas_object_map_get(eo_obj);
+   map = obj->map->cur.map;
    if (map && map->move_sync.enabled)
      {
         Evas_Coord diff_x = x - obj->cur->geometry.x;