forked from enlightenment/efl
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
This commit is contained in:
parent
33750f8fac
commit
9b7ac51943
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue