From 2d146867dc4d4e17da2fd1e4776f62aaa999d90f Mon Sep 17 00:00:00 2001 From: Andrea Canciani Date: Thu, 26 Aug 2010 14:50:34 +0200 Subject: [PATCH] subsurface: Correct cloning condition 72644c6df2c2da1d77ca10a755dbb44bbd960c0d was using the wrong (inverted) condition to check if the subsurface extents are contained in the target extents. --- src/cairo-surface-subsurface.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cairo-surface-subsurface.c b/src/cairo-surface-subsurface.c index 9a4cedd1c..c8b1a801c 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);