hermet pushed a commit to branch master.

commit 4163b2f5098e5080a6866409d57ae2565d0c10dc
Author: ChunEon Park <[email protected]>
Date:   Tue Apr 16 03:05:16 2013 +0900

    Evas: If an object goes to be hidden without replacing the cur/prev state 
info, the object context can be corrupted at the next show time. Now it 
replaces the cur/prev in that rare case.
---
 ChangeLog                         |  5 +++++
 NEWS                              |  1 +
 src/lib/evas/canvas/evas_render.c | 29 +++++++++++++++++++++--------
 3 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 41b4181..3d26874 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-15  ChunEon Park
+        * Evas: If an object goes to be hidden without replacing the cur/prev
+        state info, the object context can be corrupted at the next show time.
+        Now it replaces the cur/prev in that rare case.
+
 2013-04-15 Tom Hacohen
         * Evas textblock: Fixed a bug with deletion of ranges that end just
        before a visual format.
diff --git a/NEWS b/NEWS
index a283bea..37816e0 100644
--- a/NEWS
+++ b/NEWS
@@ -243,4 +243,5 @@ Fixes:
     * Evas: fix gif decoding bug related with background color.
     * Evas: fix gif bug related with scale down decode.
     * Evas textblock: Fixed a bug with deletion of ranges that end just a 
visual format.
+    * Evas: If an object goes to be hidden without replacing the cur/prev 
state info, the object context can be corrupted at the next show time. Now it 
replaces the cur/prev in that rare case.
 
diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index cfdd411..ecdad31 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -497,17 +497,30 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, 
Evas_Object *eo_obj,
           }
         else
           {
-             if ((is_active) && (!obj->clip.clipees) &&
-                 _evas_render_is_relevant(eo_obj))
+             if ((!obj->clip.clipees) && _evas_render_is_relevant(eo_obj))
                {
-                  RDI(level);
-                  RD("      relevant + active\n");
-                  if (obj->restack)
-                    eina_array_push(restack_objects, obj);
+                  if (is_active)
+                    {
+                       RDI(level);
+                       RD("      relevant + active\n");
+                       if (obj->restack)
+                         eina_array_push(restack_objects, obj);
+                       else
+                         {
+                            eina_array_push(render_objects, obj);
+                            obj->render_pre = EINA_TRUE;
+                         }
+                    }
                   else
                     {
-                       eina_array_push(render_objects, obj);
-                       obj->render_pre = EINA_TRUE;
+                       /* It goes to be hidden. Prev caching should be replaced
+                          by the current (hidden) state. */
+                       if (evas_object_is_visible(eo_obj, obj) !=
+                           evas_object_was_visible(eo_obj, obj))
+                         evas_object_cur_prev(eo_obj);
+
+                       RDI(level);
+                       RD("      skip - not smart, not active or clippees or 
not relevant\n");
                     }
                }
              else

-- 

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter

Reply via email to