From 47f70537b8baa0afdd28dd5c523d1956f17455cd Mon Sep 17 00:00:00 2001 From: Andrea Canciani Date: Sat, 19 Feb 2011 19:13:59 +0100 Subject: [PATCH] image: Fix surface acquisition if PIXMAN_HAS_ATOMIC_OPS If PIXMAN_HAS_ATOMIC_OPS, ix and iy will be changed if the source surface is of subsurface type. They need to be reset to 0 before being passed to _cairo_matrix_to_pixman_matrix_offset() or the acquired surface will have an incorrect offset . --- src/cairo-image-surface.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c index 9006492bb..bf22cb5e2 100644 --- a/src/cairo-image-surface.c +++ b/src/cairo-image-surface.c @@ -1417,6 +1417,10 @@ _pixman_image_for_surface (const cairo_surface_pattern_t *pattern, } } +#if PIXMAN_HAS_ATOMIC_OPS + *ix = *iy = 0; +#endif + if (pixman_image == NULL) { struct acquire_source_cleanup *cleanup; cairo_image_surface_t *image;