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>
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>
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>
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>
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>
In step 1 of speeding up stroking, we introduce contours as a means for
tracking the connected edges around the stroke. By keeping track of
these chains, we can analyse the edges as we proceed and eliminate
redundant vertices speeding up rasterisation.
Coincidentally fixes line-width-tolerance (looks like a combination of
using spline tangent vectors and tolerance).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Adjusting the _cairo_surface_is_recording() to check the value
in the backend exposed us to a potential NULL pointer dereference
on validating user-input. So add an explicit status check which
has the added bonus of being more correct!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The mime surface is a user-callback surface designed for interfacing
cairo with an opaque data source. For instance, in a web browser, the
incoming page may be laid out and rendered to a recording surface before
all the image data has finished being downloaded. In this circumstance
we need to pass a place holder to cairo and to supply the image data
later upon demand.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Another logging passthrough surface that records the style of operations
performed trying to categorise what is slow/fast/important.
In combination with perf/cairo-analyse-trace it is very useful for
understanding what a trace does. The next steps for this tool would be
to identify the slow operations that the trace does. Baby steps.
This should be generally useful in similar situations outside of perf/
and should be extensible to become an online performance probe.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
So that we remember to forget the old image when the surface is dirtied.
Fixes filter-bilinear-extents.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes push-group-offset which reduces to a replay of a recording surface
inside a recording surface and forgot to offset the clip imposed by the
extents of the first recording surface into device space.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>