summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorRafael Antognolli <antognolli@gmail.com>2012-08-23 19:58:02 +0000
committerRafael Antognolli <antognolli@gmail.com>2012-08-23 19:58:02 +0000
commitbe7953b243089685292cebb789008a642b53c402 (patch)
tree36df3cf5a19b742bc83080b49e434f538c2bb23c /legacy
parentcc2ec4105b3ff8add959c16f400471053f541a2c (diff)
evas/render: Add a flag for dropping the map cache if needed.
The map cache must be dropped if the content of the surface is rendered again. The example evas-smart-object.c has a valid test case for this bug. SVN revision: 75636
Diffstat (limited to 'legacy')
-rw-r--r--legacy/evas/src/lib/canvas/evas_object_main.c3
-rw-r--r--legacy/evas/src/lib/canvas/evas_render.c6
-rw-r--r--legacy/evas/src/lib/include/evas_private.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_object_main.c b/legacy/evas/src/lib/canvas/evas_object_main.c
index 0c74d31f1d..cfa62e1ccc 100644
--- a/legacy/evas/src/lib/canvas/evas_object_main.c
+++ b/legacy/evas/src/lib/canvas/evas_object_main.c
@@ -43,6 +43,9 @@ evas_object_change_reset(Evas_Object *obj)
43void 43void
44evas_object_cur_prev(Evas_Object *obj) 44evas_object_cur_prev(Evas_Object *obj)
45{ 45{
46 if (!obj->prev.valid_map && (obj->prev.map == obj->cur.map))
47 obj->prev.map = NULL;
48
46 if (obj->cur.map != obj->prev.map) 49 if (obj->cur.map != obj->prev.map)
47 { 50 {
48 if (obj->cache_map) evas_map_free(obj->cache_map); 51 if (obj->cache_map) evas_map_free(obj->cache_map);
diff --git a/legacy/evas/src/lib/canvas/evas_render.c b/legacy/evas/src/lib/canvas/evas_render.c
index 7c4c4c736a..f9546cfc9b 100644
--- a/legacy/evas/src/lib/canvas/evas_render.c
+++ b/legacy/evas/src/lib/canvas/evas_render.c
@@ -917,6 +917,11 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
917 evas_object_change_reset(obj); 917 evas_object_change_reset(obj);
918 } 918 }
919 919
920 /* mark the old map as invalid, so later we don't reuse it as a
921 * cache. */
922 if (changed && obj->prev.map)
923 obj->prev.valid_map = EINA_FALSE;
924
920 // clear surface before re-render 925 // clear surface before re-render
921 if ((changed) && (obj->cur.map->surface)) 926 if ((changed) && (obj->cur.map->surface))
922 { 927 {
@@ -988,6 +993,7 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
988 obj->cur.map->surface = e->engine.func->image_dirty_region 993 obj->cur.map->surface = e->engine.func->image_dirty_region
989 (e->engine.data.output, obj->cur.map->surface, 994 (e->engine.data.output, obj->cur.map->surface,
990 0, 0, obj->cur.map->surface_w, obj->cur.map->surface_h); 995 0, 0, obj->cur.map->surface_w, obj->cur.map->surface_h);
996 obj->cur.valid_map = EINA_TRUE;
991 } 997 }
992 e->engine.func->context_clip_unset(e->engine.data.output, 998 e->engine.func->context_clip_unset(e->engine.data.output,
993 context); 999 context);
diff --git a/legacy/evas/src/lib/include/evas_private.h b/legacy/evas/src/lib/include/evas_private.h
index ad6785a719..fc3033f75d 100644
--- a/legacy/evas/src/lib/include/evas_private.h
+++ b/legacy/evas/src/lib/include/evas_private.h
@@ -533,6 +533,7 @@ struct _Evas_Object
533 unsigned char r, g, b, a; 533 unsigned char r, g, b, a;
534 } color; 534 } color;
535 Eina_Bool usemap : 1; 535 Eina_Bool usemap : 1;
536 Eina_Bool valid_map : 1;
536 Eina_Bool visible : 1; 537 Eina_Bool visible : 1;
537 Eina_Bool have_clipees : 1; 538 Eina_Bool have_clipees : 1;
538 Eina_Bool anti_alias : 1; 539 Eina_Bool anti_alias : 1;