aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_map.c
diff options
context:
space:
mode:
authorSubhransu Mohanty <sub.mohanty@samsung.com>2016-10-14 19:45:42 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-10-17 10:49:10 +0900
commit9b7ac51943ba0d6391b75cf2d0318bedee905c63 (patch)
treee0015bceac7c90684775050660c4cebb005b07bd /src/lib/evas/canvas/evas_map.c
parentELM: sync "clicked" usage with other places in the lib (diff)
downloadefl-9b7ac51943ba0d6391b75cf2d0318bedee905c63.tar.gz
evas/map: do nothing when same map is set again
Reviewers: cedric, Hermet, jpeg Reviewed By: jpeg Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4344
Diffstat (limited to 'src/lib/evas/canvas/evas_map.c')
-rw-r--r--src/lib/evas/canvas/evas_map.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_map.c b/src/lib/evas/canvas/evas_map.c
index 66bea1c0e0..ccac2238af 100644
--- a/src/lib/evas/canvas/evas_map.c
+++ b/src/lib/evas/canvas/evas_map.c
@@ -51,7 +51,7 @@ _evas_map_calc_map_geometry(Evas_Object *eo_obj)
p = obj->map->cur.map->points;
p2 = obj->map->prev.map->points;
- if (memcmp(p, p2, sizeof(Evas_Map_Point) *
+ if (memcmp(p, p2, sizeof(Evas_Map_Point) *
obj->map->prev.map->count) != 0)
ch = EINA_TRUE;
if (!ch)
@@ -564,6 +564,21 @@ evas_object_map_set(Evas_Object *eo_obj, const Evas_Map *map)
{
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj);
+ // 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))
{