summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@intel.com>2013-04-26 19:26:28 -0300
committerRafael Antognolli <rafael.antognolli@intel.com>2013-04-29 11:29:43 -0300
commit4268bf99611ca31e5a4236210f8a8acb1c4923fb (patch)
tree4aab6d51dd1b23f20049e4dc349df3c012093d12
parent2e699fbab9abb2ddaac85661af329b0f16bacf16 (diff)
Revert "evas/map: Consider framespace offset when populating map points."
This reverts commit 3e43ad338d43dbe03dc401910d378aa32d84b8a7.
-rw-r--r--src/lib/evas/canvas/evas_map.c43
-rw-r--r--src/lib/evas/include/evas_private.h1
2 files changed, 4 insertions, 40 deletions
diff --git a/src/lib/evas/canvas/evas_map.c b/src/lib/evas/canvas/evas_map.c
index 66c691a..e85e6cb 100644
--- a/src/lib/evas/canvas/evas_map.c
+++ b/src/lib/evas/canvas/evas_map.c
@@ -153,7 +153,6 @@ _evas_map_copy(Evas_Map *dst, const Evas_Map *src)
153 dst->smooth = src->smooth; 153 dst->smooth = src->smooth;
154 dst->alpha = src->alpha; 154 dst->alpha = src->alpha;
155 dst->persp = src->persp; 155 dst->persp = src->persp;
156 dst->offset_applied = src->offset_applied;
157 return EINA_TRUE; 156 return EINA_TRUE;
158} 157}
159 158
@@ -166,7 +165,6 @@ _evas_map_dup(const Evas_Map *orig)
166 copy->smooth = orig->smooth; 165 copy->smooth = orig->smooth;
167 copy->alpha = orig->alpha; 166 copy->alpha = orig->alpha;
168 copy->persp = orig->persp; 167 copy->persp = orig->persp;
169 copy->offset_applied = orig->offset_applied;
170 return copy; 168 return copy;
171} 169}
172 170
@@ -537,31 +535,6 @@ evas_object_map_set(Evas_Object *eo_obj, const Evas_Map *map)
537 eo_do(eo_obj, evas_obj_map_set(map)); 535 eo_do(eo_obj, evas_obj_map_set(map));
538} 536}
539 537
540static void
541_evas_map_coord_offset_update(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Map *m)
542{
543 Evas_Public_Data *evas;
544 Evas_Map_Point *p, *p_end;
545
546 if (m->offset_applied)
547 return;
548
549 evas = obj->layer->evas;
550
551 if (obj->is_frame || (eo_obj == evas->framespace.clip))
552 return;
553
554 p = m->points;
555 p_end = p + m->count;
556 for (; p < p_end; p++)
557 {
558 p->x += evas->framespace.x;
559 p->px += evas->framespace.x;
560 p->y += evas->framespace.y;
561 p->py += evas->framespace.y;
562 }
563}
564
565void 538void
566_map_set(Eo *eo_obj, void *_pd, va_list *list) 539_map_set(Eo *eo_obj, void *_pd, va_list *list)
567{ 540{
@@ -642,18 +615,12 @@ _map_set(Eo *eo_obj, void *_pd, va_list *list)
642 615
643 // We do have the same exact count of point in this map, so just copy it 616 // We do have the same exact count of point in this map, so just copy it
644 if ((obj->map->cur.map) && (obj->map->cur.map->count == map->count)) 617 if ((obj->map->cur.map) && (obj->map->cur.map->count == map->count))
645 { 618 _evas_map_copy(obj->map->cur.map, map);
646 _evas_map_copy(obj->map->cur.map, map);
647 _evas_map_coord_offset_update(eo_obj, obj, obj->map->cur.map);
648 }
649 else 619 else
650 { 620 {
651 Evas_Map *m;
652 if (obj->map->cur.map) _evas_map_free(eo_obj, obj->map->cur.map); 621 if (obj->map->cur.map) _evas_map_free(eo_obj, obj->map->cur.map);
653 m = _evas_map_dup(map);
654 _evas_map_coord_offset_update(eo_obj, obj, m);
655 EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write) 622 EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
656 map_write->cur.map = m; 623 map_write->cur.map = _evas_map_dup(map);
657 EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write); 624 EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
658 if (obj->map->cur.usemap) 625 if (obj->map->cur.usemap)
659 evas_object_mapped_clip_across_mark(eo_obj, obj); 626 evas_object_mapped_clip_across_mark(eo_obj, obj);
@@ -892,7 +859,6 @@ evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *e
892EAPI void 859EAPI void
893evas_map_util_points_populate_from_object(Evas_Map *m, const Evas_Object *eo_obj) 860evas_map_util_points_populate_from_object(Evas_Map *m, const Evas_Object *eo_obj)
894{ 861{
895 Evas_Coord x, y, w, h;
896 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); 862 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
897 return; 863 return;
898 MAGIC_CHECK_END(); 864 MAGIC_CHECK_END();
@@ -908,9 +874,8 @@ evas_map_util_points_populate_from_object(Evas_Map *m, const Evas_Object *eo_obj
908 ERR("map has count=%d where 4 was expected.", m->count); 874 ERR("map has count=%d where 4 was expected.", m->count);
909 return; 875 return;
910 } 876 }
911 877 _evas_map_util_points_populate(m, obj->cur->geometry.x, obj->cur->geometry.y,
912 evas_object_geometry_get(eo_obj, &x, &y, &w, &h); 878 obj->cur->geometry.w, obj->cur->geometry.h, 0);
913 _evas_map_util_points_populate(m, x, y, w, h, 0);
914} 879}
915 880
916EAPI void 881EAPI void
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 325c0d6..61818a4 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -501,7 +501,6 @@ struct _Evas_Map
501 } persp; 501 } persp;
502 Eina_Bool alpha : 1; 502 Eina_Bool alpha : 1;
503 Eina_Bool smooth : 1; 503 Eina_Bool smooth : 1;
504 Eina_Bool offset_applied : 1; // whether the framespace offset was applied already or not.
505 Evas_Map_Point points[]; // actual points 504 Evas_Map_Point points[]; // actual points
506}; 505};
507 506