summaryrefslogtreecommitdiff
path: root/src/cairo-image-source.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-09-15 16:57:52 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-09-15 16:57:52 +0100
commitaf6ee4e82e912eec5ae0e20ed54a868d1abe98d3 (patch)
tree5f99ad4ba6d529c4f25eb5eeb0e37076a067cb8c /src/cairo-image-source.c
parent9bf21c74aea1110091c9c9edec8d2d0a40e3453d (diff)
downloadcairo-af6ee4e82e912eec5ae0e20ed54a868d1abe98d3.tar.gz
image: Invert recording matrix before replay
Hmm, still not quite right but an improvement. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-image-source.c')
-rw-r--r--src/cairo-image-source.c9
1 files 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;
}