From af6ee4e82e912eec5ae0e20ed54a868d1abe98d3 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 15 Sep 2011 16:57:52 +0100 Subject: [PATCH] image: Invert recording matrix before replay Hmm, still not quite right but an improvement. Signed-off-by: Chris Wilson --- src/cairo-image-source.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cairo-image-source.c b/src/cairo-image-source.c index 7c1eb8260..63fcc2f88 100644 --- a/src/cairo-image-source.c +++ b/src/cairo-image-source.c @@ -639,7 +639,7 @@ _pixman_image_for_recording (cairo_image_surface_t *dst, } else extend = CAIRO_EXTEND_NONE; - if (extents == CAIRO_EXTEND_NONE) + if (extend == CAIRO_EXTEND_NONE) limit = *extents; clone = cairo_image_surface_create (dst->format, limit.width, limit.height); @@ -653,6 +653,9 @@ _pixman_image_for_recording (cairo_image_surface_t *dst, &pattern->base.matrix); if (tx | ty) cairo_matrix_translate (m, tx, ty); + + status = cairo_matrix_invert (m); + assert (status == CAIRO_STATUS_SUCCESS); } else { /* XXX extract scale factor for repeating patterns */ } @@ -673,9 +676,11 @@ _pixman_image_for_recording (cairo_image_surface_t *dst, pixman_image_unref (pixman_image); pixman_image= NULL; } + } else { + *ix = -limit.x; + *iy = -limit.y; } - return pixman_image; }