commit 05d81d3c63d22e9b99e842f9de50c209ab0b48eb 00/76600/1
authorHermet Park <hermet@hermet.pe.kr>
Fri, 24 Jun 2016 10:03:09 +0000 (19:03 +0900)
committerHermet Park <hermet@hermet.pe.kr>
Fri, 24 Jun 2016 10:03:09 +0000 (19:03 +0900)
Author: Hermet Park <hermet@hermet.pe.kr>
Date:   Fri Jun 24 11:33:04 2016 +0900

    evas/canvas: rewrite a previous patch, ed444b698b63e0086812062abb9e3065360eb0b2

    Reviwed further, I found out the origin shouldn't be accumulated with
    previous clippers origin. I forgot this function is recursive
    function.

Change-Id: Ic66a9d8e2fc48f0af4f016067176c671409eb1e5

src/lib/evas/canvas/evas_render.c

index 52aa2e8..b73a644 100755 (executable)
@@ -1223,7 +1223,7 @@ _proxy_context_clip(Evas_Public_Data *evas, void *ctx, Evas_Proxy_Render_Data *p
                                 obj->cur->cache.clip.y + off_y,
                                 obj->cur->cache.clip.w, obj->cur->cache.clip.h);
         ENFN->context_clip_get(ENDT, ctx, NULL, NULL, &cw, &ch);
-        return (cw && ch);
+        return ((cw > 0) && (ch > 0));
      }
 
    if (!obj || !obj->cur->clipper) return EINA_TRUE;
@@ -1233,16 +1233,16 @@ _proxy_context_clip(Evas_Public_Data *evas, void *ctx, Evas_Proxy_Render_Data *p
    clip = &clipper->cur->geometry;
    ENFN->context_clip_clip(ENDT, ctx, clip->x + off_x, clip->y + off_y, clip->w, clip->h);
    ENFN->context_clip_get(ENDT, ctx, NULL, NULL, &cw, &ch);
-   if (!cw || !ch) return EINA_FALSE;
+   if ((cw <= 0) || (ch <= 0)) return EINA_FALSE;
 
    /* stop if we found the source object's clipper */
    if (clipper == proxy_render_data->src_obj->cur->clipper) return EINA_TRUE;
 
    /* recurse to the clipper itself.
-    * origin of clippers clipper won't be transformed to derivative space. */
+    * origin of clipper's clipper won't be transformed to derivative space. */
    return _proxy_context_clip(evas, ctx, proxy_render_data, clipper,
-                              (off_x - proxy_render_data->src_obj->cur->geometry.x),
-                              (off_y - proxy_render_data->src_obj->cur->geometry.y));
+                              -proxy_render_data->src_obj->cur->geometry.x,
+                              -proxy_render_data->src_obj->cur->geometry.y);
 }
 
 static void