summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2011-01-03 10:12:17 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-01-03 10:12:17 +0000
commitf9277782e705d5cdaa460fbbf3167fb6947ddb32 (patch)
treef7dcda7a5a336dfc9dea989053f3a5dcf413efab /legacy
parentea55cf1bf6e0d8e54edc24c83fefc7679ddab8fd (diff)
ooh map bug! bug bug bug! fix! (thanks valgrind)
SVN revision: 55826
Diffstat (limited to 'legacy')
-rw-r--r--legacy/evas/src/lib/canvas/evas_map.c46
1 files changed, 24 insertions, 22 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_map.c b/legacy/evas/src/lib/canvas/evas_map.c
index 0ba0aa7041..8da4b22e67 100644
--- a/legacy/evas/src/lib/canvas/evas_map.c
+++ b/legacy/evas/src/lib/canvas/evas_map.c
@@ -42,28 +42,29 @@ _evas_map_calc_map_geometry(Evas_Object *obj)
42 if (!obj->cur.map) return; 42 if (!obj->cur.map) return;
43 if (obj->prev.map) 43 if (obj->prev.map)
44 { 44 {
45 if (obj->prev.map->count == obj->cur.map->count) 45 // FIXME: this causes an infinite loop somewhere... hard to debug
46 { 46 if (obj->prev.map->count == obj->cur.map->count)
47 const Evas_Map_Point *p2; 47 {
48 48 const Evas_Map_Point *p2;
49 p = obj->cur.map->points; 49
50 p_end = p + obj->cur.map->count; 50 p = obj->cur.map->points;
51 p2 = obj->prev.map->points; 51 p_end = p + obj->cur.map->count;
52 52 p2 = obj->prev.map->points;
53 for (; p < p_end; p++, p2++) 53
54 if (p->a != p2->a || 54 for (; p < p_end; p++, p2++)
55 p->r != p2->r || 55 {
56 p->g != p2->g || 56 if ((p->a != p2->a) ||
57 p->b != p2->b) 57 (p->r != p2->r) ||
58 { 58 (p->g != p2->g) ||
59 ch = 1; 59 (p->b != p2->b))
60 break; 60 {
61 } 61 ch = 1;
62 } 62 break;
63 else 63 }
64 { 64 }
65 ch = 1; 65 }
66 } 66 else
67 ch = 1;
67 } 68 }
68 69
69 p = obj->cur.map->points; 70 p = obj->cur.map->points;
@@ -482,6 +483,7 @@ evas_object_map_set(Evas_Object *obj, const Evas_Map *map)
482 obj->cur.map = _evas_map_new(4); 483 obj->cur.map = _evas_map_new(4);
483 memcpy(obj->cur.map, omap, sizeof(Evas_Map) + (4 * sizeof(Evas_Map_Point))); 484 memcpy(obj->cur.map, omap, sizeof(Evas_Map) + (4 * sizeof(Evas_Map_Point)));
484 _evas_map_copy(obj->cur.map, map); 485 _evas_map_copy(obj->cur.map, map);
486 if (obj->prev.map == omap) obj->prev.map = NULL;
485 free(omap); 487 free(omap);
486 } 488 }
487 _evas_map_calc_map_geometry(obj); 489 _evas_map_calc_map_geometry(obj);