Exercise the bug Keith found in the xlib backend, which claimed the
output from the rectangular tessellator would always be sorted.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
None of the cairo clipping computations guarantee that the resulting
list of rectangles are constructed in any particular order. Promising
that they are results in an X error (BadMatch) which generally causes
applications to crash.
I suspect this may well be implicated in many (many) bug reports about
applications which use cairo.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As we evaluate the line first using y-for-x to find the clipped
vertical range and then rasterise the line using x-for-y, we can incur
severe rounding errors that cause us to draw beyond the clipped region.
The first simple attempt at a fix is to tweak the clipped vertical range
such that the evaluated extents of the line are contained.
Reported-by: Taekyun Kim <tkq.kim@samsung.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Use the embedded operand on the surface instead of copying it across and
trying to then wrap the surface from it - as it would then unref the
glyph cache surface after the operation and so we would lose the glyphs.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Mirrors cairo_xlib_surface_set_drawable, allowing the drawable
targeted by a surface to be changed on the fly.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Any function documented with gtk-doc must not have _ in any parameter
names, or at least that's what I've found. This patch simply renames
parameters as needed to make things work.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Only allow one owner to keep their snapshot on the subsurface, and
so automatically replace any previous snapshot.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When the sample extents exceed the subsurface bounds we need to clone
the subsurface into a regular surface in order to correctly handle the
CAIRO_EXTEND_NONE extend mode (i.e prevent sampling out-of-bounds).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As discussed, overloading the cairo_surface_t semantics to include
sources (i.e. read-only surfaces) was duplicating the definition of
cairo_pattern_t. So rather than introduce a new surface type with
pattern semantics, start along the thorny road of extensible pattern
types.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The traps compositor expects to be able to pass either in a surface or a
source to its composite functions, so make it so.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>