cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5b4e0ece687ac50a32f8e33cd45751e29ec121f4

commit 5b4e0ece687ac50a32f8e33cd45751e29ec121f4
Author: Jean-Philippe Andre <[email protected]>
Date:   Wed Jan 28 09:28:34 2015 +0100

    evas: fix some clipping issues before/after Evas_Map animations
    
    Summary:
    This is an attempt at fixing:
     - T1767: The ultimate evil map & clip bug
    
    Force recalculation and re-propagation of clipper geometry
    after or just before a map is applied (only when transiting
    between map enabled and map disabled).
    
    I realized that doing clip_unset+clip_set in the E widget
    code would fix the issue, but this is not a solution that
    makes a lot of sense.
    
    Unfortunately I have no idea about the side effects of this
    patch, especially in terms of performance.
    
    Fixes T1767 and maybe T1630.
    
    Test Plan:
    Open PackageKit popup in E, check the animations
    and that clipping works fine both during, before and after
    the animations.
    
    Reviewers: raster, cedric
    
    Reviewed By: cedric
    
    Subscribers: cedric, Hermet
    
    Maniphest Tasks: T1767
    
    Differential Revision: https://phab.enlightenment.org/D1897
    
    Signed-off-by: Cedric BAIL <[email protected]>
---
 src/lib/evas/canvas/evas_render.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 9032619..cdb25c5 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -526,6 +526,14 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, 
Evas_Object *eo_obj,
      {
         RDI(level);
         RD("      obj mapped\n");
+        if (!hmap && obj->cur->clipper)
+          {
+             // Fix some bad clipping issues before an evas map animation 
starts
+             evas_object_change(obj->cur->clipper->object, obj->cur->clipper);
+             evas_object_clip_dirty(obj->cur->clipper->object, 
obj->cur->clipper);
+             evas_object_clip_recalc(obj->cur->clipper);
+             evas_object_update_bounding_box(eo_obj, obj);
+          }
         if (obj->changed)
           {
              if (map != hmap) *redraw_all = 1;
@@ -577,6 +585,14 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, 
Evas_Object *eo_obj,
                   *redraw_all = 1;
                }
           }
+        if (obj->cur->clipper)
+          {
+             // Fix some bad clipping issues after an evas_map animation 
finishes
+             evas_object_change(obj->cur->clipper->object, obj->cur->clipper);
+             evas_object_clip_dirty(obj->cur->clipper->object, 
obj->cur->clipper);
+             evas_object_clip_recalc(obj->cur->clipper);
+             evas_object_update_bounding_box(eo_obj, obj);
+          }
      }
 
    /* handle normal rendering. this object knows how to handle maps */

-- 


Reply via email to