evas/map: do nothing when same map is set again 30/91730/2
authorSubhransu Mohanty <sub.mohanty@samsung.com>
Tue, 11 Oct 2016 06:01:52 +0000 (15:01 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Mon, 17 Oct 2016 05:48:33 +0000 (22:48 -0700)
Change-Id: I5ef2c7450e00de27cd96cb09db9d8fc518c6b5d2

src/lib/evas/canvas/evas_map.c

index d0eafaf..6251790 100644 (file)
@@ -541,6 +541,21 @@ _evas_object_map_enable_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *
 EOLIAN void
 _evas_object_map_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, const Evas_Map *map)
 {
+   // check if the new map and current map attributes are same
+   if (map && obj->map->cur.map &&
+       (obj->map->cur.map->alpha == map->alpha) &&
+       (obj->map->cur.map->smooth == map->smooth) &&
+       (obj->map->cur.map->move_sync.enabled == map->move_sync.enabled) &&
+       (obj->map->cur.map->count == map->count))
+     {
+        const Evas_Map_Point *p1, *p2;
+        p1 = obj->map->cur.map->points;
+        p2 = map->points;
+        if (memcmp(p1, p2, sizeof(Evas_Map_Point) *
+                   map->count) == 0)
+          return;
+     }
+
    evas_object_async_block(obj);
    if ((!map) || (map->count < 4))
      {