[cairo-commit] src/cairo-surface-subsurface.c

Andrea Canciani ranma42 at kemper.freedesktop.org
Thu Aug 26 05:53:00 PDT 2010


 src/cairo-surface-subsurface.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 2d146867dc4d4e17da2fd1e4776f62aaa999d90f
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Thu Aug 26 14:50:34 2010 +0200

    subsurface: Correct cloning condition
    
    72644c6df2c2da1d77ca10a755dbb44bbd960c0d was using the wrong (inverted)
    condition to check if the subsurface extents are contained in the
    target extents.

diff --git a/src/cairo-surface-subsurface.c b/src/cairo-surface-subsurface.c
index 9a4cedd..c8b1a80 100644
--- a/src/cairo-surface-subsurface.c
+++ b/src/cairo-surface-subsurface.c
@@ -341,11 +341,11 @@ _cairo_surface_subsurface_acquire_source_image (void                    *abstrac
     assert (ret);
 
     /* only copy if we need to perform sub-byte manipulation */
-    if (PIXMAN_FORMAT_BPP (extra->image->pixman_format) >= 8 ||
-	surface->extents.x < target_extents.x ||
-	surface->extents.y < target_extents.y ||
-	surface->extents.x + surface->extents.width > target_extents.x + target_extents.width ||
-	surface->extents.y + surface->extents.height > target_extents.y + target_extents.height) {
+    if (PIXMAN_FORMAT_BPP (extra->image->pixman_format) >= 8 &&
+	target_extents.x <= surface->extents.x &&
+	target_extents.y <= surface->extents.y &&
+	surface->extents.x + surface->extents.width <= target_extents.x + target_extents.width &&
+	surface->extents.y + surface->extents.height <= target_extents.y + target_extents.height) {
 
 	assert ((PIXMAN_FORMAT_BPP (extra->image->pixman_format) % 8) == 0);
 


More information about the cairo-commit mailing list