xlib: Correct the device-offset applied to the map-to-image result

A typo, a typo surely, to use extents->y twice instead of the more
normal x, y.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
xlib: Make the core compositor actually paint

It helps to actually set the fill colour when drawing...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
xlib: Trim the ximage to match the trimming of the intermediate

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
traps-compositor: add a missing release()

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
script: Update mesh pattern for earlier change of csi operators

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
image: Tidy reduction to EXTEND_NONE for replay surfaces

As _cairo_surface_get_source() returns the limits of the source, a chunk
of code to query the source extents became redundant.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
surface-wrapper: Transform the clip by the device-transform correctly

Fixes paginated fallbacks.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
xlib-xcb: Wrap cairo_xlib_device_debug_cap_xrender_version

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
boilerplate: Use any2ppm from ANY2PPM env variable

If the environment variable ANY2PPM is set, use it as the path to the
any2ppm program. Otherwise, default to "./any2ppm" as before.

This makes it possible to set the ANY2PPM variable in the
Makefile.win32 build system, which makes it possible to use the "test"
target on the script backend.
xlib: Tidy conversion of xrender format to cairo_content_t

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
xlib: Handle window-to-window copies by avoiding the use of a clip region

Rather than compress the copies into a clip + copy, iterate over and
perform each copy separately so as to avoid the confusion for
window-to-window copies and the solitary GC->pCompositeClip.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
{mask,traps}-composite: Restore unsetting of the is-clear flags for the mask

I forgot that creating any image by defaults results in pixman
calloc'ing the pixel data and so cairo helpfully sets the is-clear flag
on the surface.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
image: Handle recursive drawing of recording surface

Borrow the technique for installing a proxy-snapshot developed for
acquiring the image from a recording surface.

This prevents the cairo from exploding and using up all memory due to
infinite recursion, but it does break a few tests that perform
self-copies with differing transformations.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
debug: Add some TRACE statements for recording surfaces and snapshots

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
recording: Optimize a copy of one recording surface onto another

Rather than store a command to copy from a reference of another recording
surface onto this, just replay the other recording surface.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
subsurface: Fix typo in snapshot creation

I need to remember that the translation for the pattern matrix is the
inverse of the translation for drawing.

Fixes: subsurface-modify-parent
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
test: Add a couple of reference images for the recording surface

In tests where we apply a scale factor to a similar source, the
recording surface will produce different results to image as the scaling
of the source is performed on the geometry and not on a raster image and
so avoids scaling artefacts.
recording: Remove superfluous reset

When merging the two-clauses, I forgot to remove the second
_cairo_recording_surface_reset()

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
test: a1-line-width is a test of rasterisation, so skip for the vector backends

PDF/PS do not have the concept of aliased rendering, so like many of the
other rasterisation tests, a1-line-width cannot be tested satisfactorily
on those backends.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
pdf,ps: The device offset only needs to taken into account for raster patterns

Ordinary patterns have their device offsets pre-baked into the pattern
matrix. The difference with raster patterns is that the surface is
generated upon use by the pdf,ps and so its device offset is not known
until then.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>