This function shouldn't ever be called is xcb-shm is disabled. However, it is
still defined to avoid lots of #ifdefs.
Additionally, this removes the only use of uint64_t from cairo-xcb.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This code casts the result of _cairo_xcb_surface_create_similar() to
cairo_xcb_surface_t*. However, the tighten-bounds test makes this run with
bounded extents of size 0x0 and thus _cairo_xcb_surface_create_similar() falls
back to an image surface. Ugly.
Signed-off-by: Uli Schlachter <psychon@znc.in>
In the spirit of the new big-{little,empty}-{box,triangle} tests, this test
combines various paths. However, these paths are not only filled but also used
for clipping, resulting in 120 different combinations.
No backend currently succeeds the test. The reference image is a gimp-ination of
the image and test-fallback results and thus certainly wrong. Feel free to fix.
Additionally, this makes the xcb backend die with an ugly failed assert.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The existing API only described the method to be used for performing
rasterisation and unlike other API provided no opportunity for the user
to give a hint as to how to trade off performance against speed. So in
order to no be overly prescriptive, we extend the NONE/GRAY/SUBPIXEL
methods with FAST/GOOD/BEST hints and leave the backend to decide how
best to achieve those goals.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In order for this to be effective on small system we also need to
disable the recording of the long traces which exhaust all memory...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Another variant on big-little-box, to make sure we trim the extents
before doing the empty unbounded fixup.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The wonders one sees when looking at webpages. Who knew people would be
so inventive with clips?
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We can use the elapsed time of the indiividual operations to profile the
synchronous throughput of a trace and eliminate all replay overhead. At
the cost of running the trace synchronously of course.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
We were misclassifying rectilinear paths as aligned strokes, which is
bogus until we analyse the offset path.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
A discussion that we've been having is the use of contours in filling,
and for optimizing for convex contours in particular. A devious mind
quickly generates a shape using a convex "contour" whose hull is larger
than its area. This is due to the self-intersection of the "contour"
which if properly excised causes the contour to be classed as concave.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This exercises the bug
https://bugzilla.mozilla.org/show_bug.cgi?id=668921
which is caused by a failure to tighten the extents after tessellating
the path and the unbounded fixup is skipped as it is believed the path
covers the whole area.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As we want to record the exact command pass to us, we want to bypass any
further optimisations that the surface mid-layer might perform before
passing the operation to the recording surface.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The immediate use of this is to print out the slowest operation of each
type in a replayable manner. A continuing demonstration of how we may
analyse traces...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As the trace may leak surfaces over its lifetime, we are forced to
teardown the connection between runs.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The "continue;" in the old code never worked, because it first checked the loop
condition. Since "FALSE" (hopefully) never evaluates to true, the loop was still
left.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When we couldn't get an image from the X11 server via SHM because we ran out
shared memory, we should try again via a normal GetImage request.
Fixes: xcb-huge-image-shm
Signed-off-by: Uli Schlachter <psychon@znc.in>
This merges most of _cairo_xcb_surface_create_similar_image() into
_cairo_xcb_shm_image_create().
These two functions where already doing almost the same thing with only some
differences in error handling.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This turns an !!!ERROR!!! for scale-offset-similar with xcb-fallback into a
failed test and might fix other problems. However, since the problem here partly
is a race, those other problems might only be hit sometimes.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Seeing the relative amounts of time spent in each operation and the
slowest one of each, gives further insight into the peculiarities of a
trace. And hopefully point out areas of improvement.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
A clip with only a single path or can be reduced to a single polygon are
easier to handle than a clip containing a mixture of paths (typically
ANTIALIAS_NONE vs ANTIALIAS_DEFAULT).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Mucking around in 99fa5ff6c2, I tweaked the order to mark the
snapshot as detached before calling the callback. xcb relies on the old
ordering so that it can correctly update its fallbacks.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As these tend to be the quickest, and putting them first keeps the reports
are in an estimated fast->slow order.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>