[cairo-commit] src/cairo-xlib-surface.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri Jul 2 05:21:14 PDT 2010
src/cairo-xlib-surface.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 1f84f5682c6ff246b3d28c75c8731504f31c1ee1
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Jul 2 13:19:17 2010 +0100
xlib: Apply translation to image surface upload.
Fixes:
Bug 28888 - cairo_paint with rgb images does not work correctly
https://bugs.freedesktop.org/show_bug.cgi?id=28888
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 0281efb..baf4302 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -2329,11 +2329,14 @@ _cairo_xlib_surface_upload(cairo_xlib_surface_t *surface,
if (! _cairo_matrix_is_integer_translation (&pattern->matrix, &tx, &ty))
return CAIRO_INT_STATUS_UNSUPPORTED;
+ src_x += tx;
+ src_y += ty;
+
/* XXX for EXTEND_NONE perform unbounded fixups? */
- if (src_x + tx < extents.x ||
- src_y + ty < extents.y ||
- src_x + tx + width > (unsigned) extents.width ||
- src_y + ty + height > (unsigned) extents.height)
+ if (src_x < extents.x ||
+ src_y < extents.y ||
+ src_x + width > (unsigned) extents.width ||
+ src_y + height > (unsigned) extents.height)
{
return CAIRO_INT_STATUS_UNSUPPORTED;
}
@@ -2354,7 +2357,7 @@ _cairo_xlib_surface_upload(cairo_xlib_surface_t *surface,
cairo_region_get_rectangle (clip_region, n, &rect);
status = _draw_image_surface (surface, image,
- rect.x + src_x, rect.x + src_y,
+ rect.x + src_x, rect.y + src_y,
rect.width, rect.height,
rect.x, rect.y);
if (unlikely (status))
More information about the cairo-commit
mailing list