summaryrefslogtreecommitdiff
path: root/src/cairo-surface-fallback-private.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-09-27 00:18:07 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-09-27 02:20:42 +0100
commit5b97ee65259cafb335c1a2c53f1a55dfcb175e20 (patch)
tree0e5fe01b793350974ea16b39ee2f543b8c28c3a6 /src/cairo-surface-fallback-private.h
parent7f3a48f90b409653a2d4fb802779ecb7508e4d6e (diff)
downloadcairo-5b97ee65259cafb335c1a2c53f1a55dfcb175e20.tar.gz
Allow cloning sub-regions of similar surfaces.
Previously the rule for clone_similar() was that the returned surface had exactly the same size as the original, but only the contents within the region of interest needed to be copied. This caused failures for very large images in the xlib-backend (see test/large-source). The obvious solution to allow cloning only the region of interest seemed to be to simply set the device offset on the cloned surface. However, this fails as a) nothing respects the device offset on the surface at that layer in the compositing stack and b) possibly returning references to the original source surface provides further confusion by mixing in another source of device offset. The second method was to add extra out parameters so that the device offset could be returned separately and, for example, mixed into the pattern matrix. Not as elegant, a couple of extra warts to the interface, but it works - one less XFAIL...
Diffstat (limited to 'src/cairo-surface-fallback-private.h')
-rw-r--r--src/cairo-surface-fallback-private.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cairo-surface-fallback-private.h b/src/cairo-surface-fallback-private.h
index 82c56256b..a4a05dc70 100644
--- a/src/cairo-surface-fallback-private.h
+++ b/src/cairo-surface-fallback-private.h
@@ -124,6 +124,8 @@ _cairo_surface_fallback_clone_similar (cairo_surface_t *surface,
int src_y,
int width,
int height,
+ int *device_offset_x,
+ int *device_offset_y,
cairo_surface_t **clone_out);
#endif