summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_map.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2013-01-21 03:51:58 +0000
committerCedric BAIL <cedric.bail@free.fr>2013-01-21 03:51:58 +0000
commit380aea9e916dab5b7e493cc4958390646f2227a1 (patch)
tree4a6278a145de3fe571b8e543025e8242e2eb30fb /src/lib/evas/canvas/evas_map.c
parent01739d4cc1169d3a0992c5ea8d66a9c37854111e (diff)
efl: cleanup Evas_Object_Protected_Data.
SVN revision: 83028
Diffstat (limited to 'src/lib/evas/canvas/evas_map.c')
-rw-r--r--src/lib/evas/canvas/evas_map.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/lib/evas/canvas/evas_map.c b/src/lib/evas/canvas/evas_map.c
index 348582f..b921907 100644
--- a/src/lib/evas/canvas/evas_map.c
+++ b/src/lib/evas/canvas/evas_map.c
@@ -58,8 +58,8 @@ _evas_map_calc_map_geometry(Evas_Object *eo_obj)
58 ch = EINA_TRUE; 58 ch = EINA_TRUE;
59 if (!ch) 59 if (!ch)
60 { 60 {
61 if (obj->cache_map) evas_map_free(obj->cache_map); 61 if (obj->map.cache_map) evas_map_free(obj->map.cache_map);
62 obj->cache_map = obj->cur.map; 62 obj->map.cache_map = obj->cur.map;
63 obj->cur.map = obj->prev.map; 63 obj->cur.map = obj->prev.map;
64 } 64 }
65 } 65 }
@@ -170,11 +170,11 @@ _evas_map_free(Evas_Object *eo_obj, Evas_Map *m)
170 if (eo_obj) 170 if (eo_obj)
171 { 171 {
172 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); 172 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
173 if ((obj) && (obj->spans)) 173 if ((obj) && (obj->map.spans))
174 { 174 {
175 obj->layer->evas->engine.func->image_map_clean(obj->layer->evas->engine.data.output, obj->spans); 175 obj->layer->evas->engine.func->image_map_clean(obj->layer->evas->engine.data.output, obj->map.spans);
176 free(obj->spans); 176 free(obj->map.spans);
177 obj->spans = NULL; 177 obj->map.spans = NULL;
178 } 178 }
179 } 179 }
180 m->magic = 0; 180 m->magic = 0;
@@ -537,9 +537,9 @@ _map_set(Eo *eo_obj, void *_pd, va_list *list)
537 537
538 if (obj->prev.map == obj->cur.map) 538 if (obj->prev.map == obj->cur.map)
539 obj->cur.map = NULL; 539 obj->cur.map = NULL;
540 else if (!obj->cache_map) 540 else if (!obj->map.cache_map)
541 { 541 {
542 obj->cache_map = obj->cur.map; 542 obj->map.cache_map = obj->cur.map;
543 obj->cur.map = NULL; 543 obj->cur.map = NULL;
544 } 544 }
545 else 545 else
@@ -567,8 +567,8 @@ _map_set(Eo *eo_obj, void *_pd, va_list *list)
567 567
568 if (!obj->cur.map) 568 if (!obj->cur.map)
569 { 569 {
570 obj->cur.map = obj->cache_map; 570 obj->cur.map = obj->map.cache_map;
571 obj->cache_map = NULL; 571 obj->map.cache_map = NULL;
572 } 572 }
573 573
574 // We do have the same exact count of point in this map, so just copy it 574 // We do have the same exact count of point in this map, so just copy it
@@ -1184,11 +1184,11 @@ evas_object_map_update(Evas_Object *eo_obj,
1184 RGBA_Map_Point *pts, *pt; 1184 RGBA_Map_Point *pts, *pt;
1185 1185
1186 if (!obj) return; 1186 if (!obj) return;
1187 if (obj->spans) 1187 if (obj->map.spans)
1188 { 1188 {
1189 if (obj->spans->x != x || obj->spans->y != y || 1189 if (obj->map.spans->x != x || obj->map.spans->y != y ||
1190 obj->spans->image.w != imagew || obj->spans->image.h != imageh || 1190 obj->map.spans->image.w != imagew || obj->map.spans->image.h != imageh ||
1191 obj->spans->uv.w != uvw || obj->spans->uv.h != uvh) 1191 obj->map.spans->uv.w != uvw || obj->map.spans->uv.h != uvh)
1192 obj->changed_map = EINA_TRUE; 1192 obj->changed_map = EINA_TRUE;
1193 } 1193 }
1194 else 1194 else
@@ -1198,31 +1198,31 @@ evas_object_map_update(Evas_Object *eo_obj,
1198 1198
1199 if (!obj->changed_map) return ; 1199 if (!obj->changed_map) return ;
1200 1200
1201 if (obj->cur.map && obj->spans && obj->cur.map->count != obj->spans->count) 1201 if (obj->cur.map && obj->map.spans && obj->cur.map->count != obj->map.spans->count)
1202 { 1202 {
1203 if (obj->spans) 1203 if (obj->map.spans)
1204 { 1204 {
1205 // Destroy engine side spans 1205 // Destroy engine side spans
1206 free(obj->spans); 1206 free(obj->map.spans);
1207 } 1207 }
1208 obj->spans = NULL; 1208 obj->map.spans = NULL;
1209 } 1209 }
1210 1210
1211 if (!obj->spans) 1211 if (!obj->map.spans)
1212 obj->spans = calloc(1, sizeof (RGBA_Map) + 1212 obj->map.spans = calloc(1, sizeof (RGBA_Map) +
1213 sizeof (RGBA_Map_Point) * (obj->cur.map->count - 1)); 1213 sizeof (RGBA_Map_Point) * (obj->cur.map->count - 1));
1214 1214
1215 if (!obj->spans) return ; 1215 if (!obj->map.spans) return ;
1216 1216
1217 obj->spans->count = obj->cur.map->count; 1217 obj->map.spans->count = obj->cur.map->count;
1218 obj->spans->x = x; 1218 obj->map.spans->x = x;
1219 obj->spans->y = y; 1219 obj->map.spans->y = y;
1220 obj->spans->uv.w = uvw; 1220 obj->map.spans->uv.w = uvw;
1221 obj->spans->uv.h = uvh; 1221 obj->map.spans->uv.h = uvh;
1222 obj->spans->image.w = imagew; 1222 obj->map.spans->image.w = imagew;
1223 obj->spans->image.h = imageh; 1223 obj->map.spans->image.h = imageh;
1224 1224
1225 pts = obj->spans->pts; 1225 pts = obj->map.spans->pts;
1226 1226
1227 p = obj->cur.map->points; 1227 p = obj->cur.map->points;
1228 p_end = p + obj->cur.map->count; 1228 p_end = p + obj->cur.map->count;