An unbounded recording surface will complain loudly when you call
acquire_source_image on it and thus we need a special case which draws the
recording surface to a temporary surface and then proceeds with that.
Signed-off-by: Uli Schlachter <psychon@znc.in>
userdict is not permitted in EPS files. Since the PS surface does not
leave extra operators or dictionaries on the stack the EPS prolog and
trailer can be reduced to:
save
50 dict begin
....
end
restore
The save/restore pair is required to remove fonts and restore the
graphics state. As "restore" does not restore the dictionary stack,
using a new current dictionary for the EPS file allows the cairo dict
entries to be cleaned up at the end the EPS.
Bug 43634
In the case where we created a surface to handle an operand, it needs to
be freed when we release the operand. However, we also have to be
careful not to introduce reference cycles into ordinary surfaces, so
always remember to teardown the composite setup!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The operand->texture.surface should be set to right value, not
NULL. Otherwise, when doing _cairo_gl_surface_operand_init(),
the texture.surface in operand struct will also be NULL, which
is incorrect. This fix regression suite in 43 test cases(such
as source-clip) in cairo/test/.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This was introduced in a69335a84e when the second argument of
_cairo_xcb_surface_create_similar_image was changed from content to format.
Signed-off-by: Uli Schlachter <psychon@znc.in>
In order to decouple the texture node from the scaled glyph cache, we
need to add a callback from the rtree for when the node is removed.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Allocating a stencil and a depth buffer for every destination surface is
simply too expensive and causes major resource issues. So defer the
allocation and attachment of a stencil buffer until just prior to first
use.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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>