Rather than having the reference images individually listed in
test/Makefile.refs the whole directory can be included in the EXTRA_DIST
block.
This removes the need to have the check-ref-missing Makefile target.
On some platforms, executables have an extension which confuses
automake into building an entirely different binary.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The classic tiger's head; a simple example of a reasonably complex shape
consisting of multiple layers.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The cairo-missing library provides the functions which are needed in
order to correctly compile cairo (or its utilities) and which were not
found during configuration.
Fixes the build on MacOS X Lion, which failed because of collisons
between the cairo internal getline and strndup and those in libc:
cairo-analyse-trace.c:282: error: static declaration of ‘getline’ follows non-static declaration
/usr/include/stdio.h:449: error: previous declaration of ‘getline’ was here
cairo-analyse-trace.c:307: error: static declaration of ‘strndup’ follows non-static declaration
...
Still hopelessly broken. Requires compiling cairo to use static linking
and then still requires manual linkage to workaround libtool. Lots of
functionality is still absent - we need to either find analogues to some
Cairo operations or implement fallbacks - but it is sufficient to
investigate how Skia functions in direct comparison with Cairo for
tessellation/rasterisation.
Caveat emptor.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
b8f43617a9 regressed the generation of
Makefiles. automake 1.10 fails when executed during ./autogen.sh:
automake: cairo_test_suite_OBJECTS should not be defined
test/Makefile.am:76: while processing program `cairo-test-suite'
ce3806510f changed the format of
Makefile.refs, breaking the check-ref-missing target.
Ignoring any line not containing a .png file fixes check-ref-missing
and makes it more robust.
Generates the lexicographical Makefile.refs based on the *.ref.png and
*.xfail.png checked into git.
This might be nice to automate as a Makefile target. But for now play
safe and do the updates manually.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
On linux it is impossible to check the missing references because of
argument length constraints:
make: execvp: /bin/bash: Argument list too long
Using a temporary file instead of variable expansion makes it possible
to work around this.
Makefile.refs is now required to be in lexicographical order, which
avoids ordering problems and the risk of duplicated entries (like
clipped-surface.ref.png).
In commit 532cbcfbc7 'Add unaligned boxes to "operator-source" test', I
removed some reference images from the test suite, but I forgot to also remove
these files from test/Makefile.am. This caused "make dist" to fail.
Thanks to Alexandros Frantzis for noticing this.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This new test (based on show-glyphs-many) checks that the glyphs
advances are respected along both axes.
9c0d761bfc introduced a bug which
regresses this test in quartz.
Thanks to Jeff Muizelaar for the report!
The following commits fix and/or improve the output of some tests.
Updating the ref images before fixing the code allows to check that
the fix is correct and makes it easy to find out which tests are fixed
by each commit.
Sometimes it is useful to be able to package the result of a run of
the testsuite. This new target creates an archive containing the html
page and at least all the files it links to.
The archive might contain some unneeded images.
This was found via cairo-perf-micro which sometimes triggered this bug in its
mask-similar_image-* test.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The old radial gradient tests were actually drawing the same gradients
with different operators (OVER/SOURCE) and operations (paint/mask).
It is possible to refactor them to share the gradient construction
code. This makes it easy to change the gradient shape in all of them
to test more interesting combinations.
Instead of testing 16 generic positions we are now testing just 7
cases, which correspond to every possible combination of the relative
size and position of the two circles defining the gradient. In
particular we are now testing a constant radius gradient and gradients
with tangent circles.
mesh-pattern tests a mesh pattern with non-opaque two overlapping
patches.
mesh-pattern-accuracy tests the accuracy of the color computed in each
point of a patch. It can point out defects in rasterizers which rely
on mesh subdivision only use the mesh shape instead of both shape and
color to decide when the tensor-product patches can be approximated
with Gouraud-shaded triangles.
mesh-pattern-conical is an example of how a conical gradient can be
approximated with a mesh pattern.
mesh-pattern-control-points tests a mesh pattern with control points
in non-default position to verify that their position affects the
color as expected.
mesh-pattern-fold tests a mesh pattern with a patch which folds along
both sides.
mesh-pattern-overlap tests a mesh pattern with a patch which folds
along just one side.
mesh-pattern-transformed tests a mesh pattern with non-identity
transform matrix.
The recent (and not-so-recent) changes in gradient code changed the
results of some tests involving gradients.
radial-gradient-* tests are marked XFAIL for pdf because poppler is
not sampling the color function with a sufficient frequency, but they
look correct in Adobe Reader.
The handling of angles above 2pi in cairo_arc is not very solid and is
basically untested.
This test should ensure that changes in the behavior will be noticed
by the testsuite.
The rectilinear scan converter assumes disjoint rects as input, but
cairo-image passes intersecting rectangles to it.
This test shows that image and any backends passing through it for the
rasterization (fallbacks, vector backends whose renderer is
cairo-based) fail in compute the corners of intersecting rectangles
correctly.
Merge clip-*-unbounded tests and add self-intersections to the paths
that are drawn. This exposes a bug in the unbounded fixup code in quartz.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Use two levels of pthread support: a minimal level used to
build cairo itself, and a full level to build threaded apps
which want to use cairo. The minimal level tries to use
pthread stubs from libc if possible, but falls back to the
full level if that's not possible. We use CFLAGS=-D_REENTRANT
LIBS=-lpthread to find a real pthread library since that seems
to work on every unix-like test box we can get our hands on.
halo uses text_path + stroke + (fill | show_text) to generate a "halo"
around the string. This is to try to replicate a bug described by Ian
Britten in the PDF backend where the rendering of the show_text looked
distorted compared to the stroke.