evas: clip the clip rect to surface boundary in ector draw.
authorSubhransu Mohanty <sub.mohanty@samsung.com>
Thu, 27 Aug 2015 01:48:45 +0000 (10:48 +0900)
committerCedric BAIL <cedric@osg.samsung.com>
Mon, 21 Sep 2015 20:50:33 +0000 (22:50 +0200)
Change-Id: If747a055eb935a7369eaf8d16d1577200a23b54c
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/modules/evas/engines/software_generic/evas_engine.c

index 3291b2a..3df3aaf 100644 (file)
@@ -3602,6 +3602,9 @@ eng_ector_renderer_draw(void *data EINA_UNUSED, void *context, void *surface, Ec
         clip.y = dc->clip.y;
         clip.w = dc->clip.w;
         clip.h = dc->clip.h;
+        // clip the clip rect to surface boundary.
+        RECTS_CLIP_TO_RECT(clip.x, clip.y, clip.w, clip.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
+        if ((clip.w < 1) || (clip.h < 1)) return;
      }
    else
      {