aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_map.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-04-10 19:38:56 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-04-10 19:38:56 +0900
commitfd69113f6a9e2735a3e1ad2d0830982c722f453e (patch)
treebe994f5e7a3f8943fb5e462f2807b06013bcb83a /src/lib/evas/canvas/evas_map.c
parentevas filters: Fix a rare crash in text render (SW) (diff)
downloadefl-fd69113f6a9e2735a3e1ad2d0830982c722f453e.tar.gz
evas map: Fix test case "Flip Page"
Since 9b7ac51943ba0d6391b75cf evas map tries to avoid recalculating stuff when the map parameters have not changed. Unfortunately the code in elementary_test -to "Flip Page" was badly written. It was modifying a constant's internal value (after ugly cast). So the memcmp() and all other checks would return successfully, as the exact same pointer was being compared to itself. So, I've fixed the comparison by adding some forgotten parameters (perspective) but most importantly I fixed the map API usage in the test case.
Diffstat (limited to 'src/lib/evas/canvas/evas_map.c')
-rw-r--r--src/lib/evas/canvas/evas_map.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/evas_map.c b/src/lib/evas/canvas/evas_map.c
index b3207e995a..7f8e794a45 100644
--- a/src/lib/evas/canvas/evas_map.c
+++ b/src/lib/evas/canvas/evas_map.c
@@ -556,22 +556,25 @@ evas_object_map_set(Evas_Object *eo_obj, const Evas_Map *map)
{
Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj);
+ evas_object_async_block(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->move_sync.diff_x == map->move_sync.diff_x) &&
+ (obj->map->cur.map->move_sync.diff_y == map->move_sync.diff_y) &&
(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)
+ if (!memcmp(p1, p2, sizeof(Evas_Map_Point) * map->count) &&
+ !memcmp(&map->persp, &obj->map->cur.map->persp, sizeof(map->persp)))
return;
}
- evas_object_async_block(obj);
if ((!map) || (map->count < 4))
{
if (obj->map->surface)