Cool!

At least you removed one nightmare from my queue. 

Thank you.

------------------------------------
-Regards, Hermet-
-----Original Message-----
From: "Enlightenment SVN"<no-re...@enlightenment.org> 
To: <enlightenment-...@lists.sourceforge.net>; 
Cc: 
Sent: 2012-08-24 (금) 04:58:02
Subject: E SVN: antognolli IN trunk/evas/src/lib: canvas include

Log:
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.
  
  

Author:       antognolli
Date:         2012-08-23 12:58:02 -0700 (Thu, 23 Aug 2012)
New Revision: 75636
Trac:         http://trac.enlightenment.org/e/changeset/75636

Modified:
  trunk/evas/src/lib/canvas/evas_object_main.c 
trunk/evas/src/lib/canvas/evas_render.c 
trunk/evas/src/lib/include/evas_private.h 

Modified: trunk/evas/src/lib/canvas/evas_object_main.c
===================================================================
--- trunk/evas/src/lib/canvas/evas_object_main.c2012-08-23 19:49:48 UTC (rev 
75635)
+++ trunk/evas/src/lib/canvas/evas_object_main.c2012-08-23 19:58:02 UTC (rev 
75636)
@@ -43,6 +43,9 @@
 void
 evas_object_cur_prev(Evas_Object *obj)
 {
+   if (!obj->prev.valid_map && (obj->prev.map == obj->cur.map))
+     obj->prev.map = NULL;
+
    if (obj->cur.map != obj->prev.map)
      {
         if (obj->cache_map) evas_map_free(obj->cache_map);

Modified: trunk/evas/src/lib/canvas/evas_render.c
===================================================================
--- trunk/evas/src/lib/canvas/evas_render.c2012-08-23 19:49:48 UTC (rev 75635)
+++ trunk/evas/src/lib/canvas/evas_render.c2012-08-23 19:58:02 UTC (rev 75636)
@@ -917,6 +917,11 @@
              evas_object_change_reset(obj);
           }

+        /* mark the old map as invalid, so later we don't reuse it as a
+         * cache. */
+        if (changed && obj->prev.map)
+           obj->prev.valid_map = EINA_FALSE;
+
         // clear surface before re-render
         if ((changed) && (obj->cur.map->surface))
           {
@@ -988,6 +993,7 @@
              obj->cur.map->surface = e->engine.func->image_dirty_region
                 (e->engine.data.output, obj->cur.map->surface,
                  0, 0, obj->cur.map->surface_w, obj->cur.map->surface_h);
+             obj->cur.valid_map = EINA_TRUE;
           }
         e->engine.func->context_clip_unset(e->engine.data.output,
                                            context);

Modified: trunk/evas/src/lib/include/evas_private.h
===================================================================
--- trunk/evas/src/lib/include/evas_private.h2012-08-23 19:49:48 UTC (rev 75635)
+++ trunk/evas/src/lib/include/evas_private.h2012-08-23 19:58:02 UTC (rev 75636)
@@ -533,6 +533,7 @@
          unsigned char      r, g, b, a;
       } color;
       Eina_Bool             usemap : 1;
+      Eina_Bool             valid_map : 1;
       Eina_Bool             visible : 1;
       Eina_Bool             have_clipees : 1;
       Eina_Bool             anti_alias : 1;


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-svn mailing list
enlightenment-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to