raster pushed a commit to branch master.

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

commit ecc556c7156362c2818b54bfb20f4c2d781b309d
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Wed May 25 11:45:16 2016 +0900

    evas - use actual smart bounding box not obj geometry for render incl
    
    render inclusion has bene used smart geom not bounding box from actual
    objects for inclusion in rendering. use the bounding box to be correct.
    
    @fix
---
 src/lib/evas/canvas/evas_render.c | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 95015cb..3a8322a 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -2220,6 +2220,26 @@ _cb_always_call(Evas *eo_e, Evas_Callback_Type type, 
void *event_info)
    for (i = 0; i < freeze_num; i++) eo_event_freeze(eo_e);
 }
 
+static inline Eina_Bool
+_is_obj_in_rect(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj,
+                int x, int y, int w, int h)
+{
+   if (obj->is_smart)
+     {
+        Evas_Coord_Rectangle rect;
+
+        evas_object_smart_bounding_box_get(eo_obj, &rect, NULL);
+        if (RECTS_INTERSECT(x, y, w, h, rect.x, rect.y, rect.w, rect.h))
+          return EINA_TRUE;
+     }
+   else
+     {
+        if (evas_object_is_in_output_rect(eo_obj, obj, x, y, w, h))
+          return EINA_TRUE;
+     }
+   return EINA_FALSE;
+}
+
 static Eina_Bool
 evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *e,
                                   void *surface, void *context,
@@ -2295,8 +2315,7 @@ evas_render_updates_internal_loop(Evas *eo_e, 
Evas_Public_Data *e,
         RD(level, "    OBJ: [%p", eo_obj);
         IFRD(obj->name, 0, " '%s'", obj->name);
         RD(level, "] '%s' %i %i %ix%i\n", obj->type, obj->cur->geometry.x, 
obj->cur->geometry.y, obj->cur->geometry.w, obj->cur->geometry.h);
-        if ((evas_object_is_in_output_rect(eo_obj, obj, ux - fx, uy - fy, uw, 
uh) ||
-             (obj->is_smart)) &&
+        if ((_is_obj_in_rect(eo_obj, obj, ux - fx, uy - fy, uw, uh)) &&
             (!obj->clip.clipees) &&
             (obj->cur->visible) &&
             (!obj->delete_me) &&

-- 


Reply via email to