evas: Fix double clipping issue with map
authorjiin.moon <jiin.moon@samsung.com>
Thu, 2 Mar 2017 06:53:03 +0000 (15:53 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Thu, 2 Mar 2017 07:43:47 +0000 (16:43 +0900)
If object's parent has map and object also has map, the evas
clip would be applied twice.

The context already applied clip area when drawing on map_surface.
So don't need more clipping when drawing map_image.

Also, make sure to apply the framespace clip when drawing the map
surface onto the final canvas. Thanks @jiin.moon for the initial
patch (see D4694).

@fix

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
src/lib/evas/canvas/evas_render.c

index 43085aa..00c2f6b 100644 (file)
@@ -2031,7 +2031,15 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
 
              if (obj->cur->cache.clip.visible || !proxy_src_clip)
                {
-                  ENFN->context_clip_clip(ENDT, ctx, ecx, ecy, ecw, ech);
+                  if (!mapped)
+                    {
+                       ENFN->context_clip_clip(ENDT, ctx, ecx, ecy, ecw, ech);
+                       if (!_is_obj_in_framespace(obj, evas))
+                         {
+                            _evas_render_framespace_context_clip_clip
+                                  (evas, ctx, off_x - evas->framespace.x, off_y - evas->framespace.y);
+                         }
+                    }
                   ENFN->context_multiplier_unset(ENDT, ctx);
                   ENFN->context_render_op_set(ENDT, ctx, obj->cur->render_op);
 #ifdef REND_DBG