A typo, I missed converting the user over to the freshly sorted list,
leaving it iterating over original but checking the sorted for termination
conditions.
Soeren was the first to report a clipping regression in the xlib backend
with strokes, and provided a test case to exercise the bug. This is an
extension of his test to provide coverage of different clipping and
stroking methods.
To correctly handle retessellating trapezods constructed from alternately
wound boxes, then we need to pass that information from the path to the
tessellator. We do this by switching the direction of the box if the first
edge is horizontal as opposed to vertical.
Currently the tracing code for glyphs constructs an temporary path in
order to replay and append to the output. This temporary allocation is
extremely wasteful as we can just directly append the glyph path to
the output path.
If the stroke is degenerate, i.e. the path consists only of a single
move-to and no edges, then the stroke may be visible due to end-capping
(as opposed to fills which are empty). So we also need to pad out the
extents around the current point for the degenerate case.
_cairo_path_fixed_is_box() is only called for filled paths and so must
handle the implicit close (which was already being correctly handled by
_cairo_path_fixed_iter_is_box).
Fixes test/implicit-close
By forgetting the implicit-close when checking for rectilinear paths, we
tried to feed the triangle (and other diagclose) into the specialised
rectilinear tesselators which completely mishandled that final edge.
This is a simple test that broke with the determination of rectilinearity
during path construction. I forgot the implicit close on fill and so the
ignored the final diagonal edge and failed to draw the triangle.
For the purposes of benchmarking it is useful to run cairo-perf against a
different library from the one it was compiled against. In order to do so,
we need to check that the runtime library contains the required entry
points for our targets - which we can check by using dlsym.
The assert() is only correct for the normal paths, but failed on the error
path. It has been run for long enough for me to be confident that the code
is self-consistent, so I think I can now safely remove it.
Innocuous warnings about the use of mismatching explicit casts (I'm really
not convinced by the merits of this particular compiler warning, but it
does cleanse the code slightly.)
Previously the pattern_acquire_surface routine only had to worry about
handling extend modes NONE or REPEAT and so the test for ! REPEAT
sufficed when what was actually intended was a test for NONE.
Always use spans, even for unaligned boxes. In the future (given a new
interface) we may want to emit the common unaligned box code more
efficient than a per-scanline computation -- but for now simply avoid the
requirements to write a temporary CPU buffer.
As we never return an error status during the path construction, we can
use the return value for the QPainterPath instead, greatly simplifying the
callers.
The higher level code ensures that the region of interest is trimmed to
our declared surface extents, so performing the intersection again is
redundant. Furthermore with the change in the clipping code, the
fallback region is no longer clipped, especially as the clip that is
currently set upon the DC is likely to be stale and incorrect for the
fallback.
Hopefully this resolves the assertion failure reported by Damian Frank,
http://lists.cairographics.org/archives/cairo/2009-August/018015.html
CC: Damian Frank <damian.frank@gmail.com>
Originally written by Vladimir Vukicevic to investigate using Skia for
Mozilla, it provides a nice integration with a rather interesting code
base. By hooking Skia underneath Cairo it allows us to directly compare
code paths... which is interesting.
[updated by Chris Wilson]
Under simple, yet common, conditions using a bounded operator and painting
with a single complex clip we can reduce the strength of that operation to
a fill. In effect this removes the need for a temporary mask for some
backends (GL, drm, xlib).
A very simple surface that produces a hierarchical DAG in a simple XML
format. It is intended to be used whilst debugging, for example with the
automatic regression finding tools of cairo-sphinx, and with test suites
that just want to verify that their code made a particular Cairo call.
sphinx is an alternate version of the current cairo-test-trace. It's
purpose is to replay a live application (which may just be a replay of a
trace) against a backend and its reference. The improvement over the
original cairo-test-trace is that the reference backend may be from an
older version of cairo.
As we set the size of the surface to fit the ink extents of the meta
surface, we also need to ensure that the origin of the script lies at the
origin of the ink extents.
This is a simple variation on cairo-trace that wraps records the last 16
contexts by wrapping the target surface inside a tee surface, along with a
meta/recording surface. Then on receipt of a SIGUSR1, those last 16
contexts are played via a script-surface into /tmp/fdr.trace.
Mostly proof-of-concept, it seems to be causing a number of rendering
glitches whilst testing with firefox -- otherwise, it seems to works.
Add a new surface type that multiplies it input onto several output
surfaces. The only limitation is that it requires a master surface that is
used whenever we need to query surface options, such as font options and
extents.
Add an even simpler sweep-line tessellator for rectangular trapezoids (as
produced by the rectilinear stoker and box filler).
This is so simple it even outperforms pixman's region validation code for the
purposes of path-to-region conversion.
Previously the contexts were permanently associated with the surface and
only destroyed along with the final reference to the surface. This meant
that we kept a large number of unwanted contexts in memory. Most
applications only have a few contexts active at any time, so remove
inactive contexts from the operand stack every time we perform an
operation on a different context.