From: Subhransu Mohanty Date: Tue, 11 Oct 2016 06:01:52 +0000 (+0900) Subject: evas/map: do nothing when same map is set again X-Git-Tag: accepted/tizen/common/20161019.145824~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F91730%2F2;p=platform%2Fupstream%2Fefl.git evas/map: do nothing when same map is set again Change-Id: I5ef2c7450e00de27cd96cb09db9d8fc518c6b5d2 --- diff --git a/src/lib/evas/canvas/evas_map.c b/src/lib/evas/canvas/evas_map.c index d0eafaf..6251790 100644 --- a/src/lib/evas/canvas/evas_map.c +++ b/src/lib/evas/canvas/evas_map.c @@ -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)) {