Commit graph

664 commits

Author SHA1 Message Date
Rob Bradford
82a7eac1de build: Specify the reference images as a directory for EXTRA_DIST
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.
2011-09-27 15:44:57 +01:00
Chris Wilson
2209ec5a15 test: Make cairo_test_suite depend upon the any2ppm exectuable on all platforms
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>
2011-09-18 08:52:46 +01:00
Chris Wilson
5f8ee79b40 test: Write the individual test logs to output/
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-15 14:21:20 +01:00
Chris Wilson
9f605b0c84 test: Add the PS tiger
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>
2011-09-14 19:10:22 +01:00
Andrea Canciani
6d6bfbd641 Introduce the cairo-missing library
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
...
2011-09-02 12:27:13 +02:00
Chris Wilson
1ccd269a3f skia: Update to use cairo_backend_t interface
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>
2011-08-13 09:58:02 +01:00
Andrea Canciani
e5dfac245f build: Fix automake error
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'
2011-07-19 07:26:59 +02:00
Chris Wilson
b8f43617a9 test: Always compile cairo-test-suite
I'm tired of having to explicitly type make cairo-test-suite.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-16 20:45:03 +01:00
Andrea Canciani
a6d4d840d3 test: Fix check-ref-missing
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.
2011-06-25 14:35:38 +02:00
Chris Wilson
ce3806510f test: Add a Makefile.refs generator
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>
2011-06-25 13:08:17 +01:00
Andrea Canciani
6835421003 test: Fix typo
scrdir -> srcdir
2011-06-25 09:46:46 +02:00
Andrea Canciani
5c798bcf86 test: Improve check-ref-missing
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).
2011-06-25 09:39:52 +02:00
Chris Wilson
1b33552a6d test: Add unaligned-box
Test the handling of the various pixel-alignment boundary points of
rectangles.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-06-01 18:09:48 +01:00
Uli Schlachter
b377380b7a test/Makefile.am: Don't reference non-existant files
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>
2011-04-05 19:08:31 +02:00
Andrea Canciani
4369255961 test: Add stroke-open-box
Add a new test to check that the stroking of a 3-sided box is not
"optimized" to a 4-sided box.

Test case based on the code by Simon Kellner in
https://bugs.freedesktop.org/show_bug.cgi?id=34560
2011-03-18 10:30:25 +01:00
Andrea Canciani
db04ab8f63 test: Add show-glyphs-advance
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!
2011-03-18 09:41:55 +01:00
Andrea Canciani
e45077612d test: Fix missing REFERENCE_IMAGES 2011-03-17 16:47:33 +01:00
Andrea Canciani
219f0d49a3 test: Fix REFERENCE_IMAGES
Makefile.am not updated along with changing the reference images in
6825007ac6 and
070bc5dd89.
2011-02-14 10:00:25 +01:00
Chris Wilson
fda784793e test: Attempt to capture out-of-bounds spans compositing bug
Attempt to provoke out-of-bounds accesses as demonstrated by
https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/710072

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-06 18:12:08 +00:00
Andrea Canciani
5a1e590b12 test: Update quartz ref images
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.
2011-01-19 11:52:41 +01:00
Andrea Canciani
45505fc5fb Add a results.tar.gz target to the test Makefile
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.
2011-01-18 16:00:08 +01:00
Uli Schlachter
44095f3dde Add a test case for a bug in the xcb backend
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>
2011-01-17 22:21:20 +01:00
Andrea Canciani
9e6d8ff86c test: Add missing ref image to REFERENCE_IMAGES 2011-01-17 12:17:30 +01:00
Andrea Canciani
ada6057b8c test: New radial-gradient tests
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.
2011-01-02 18:31:35 +01:00
Adrian Johnson
a8344f98e7 test: Add tests for mesh patterns
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.
2011-01-01 13:05:14 +01:00
Andrea Canciani
19b840a904 Keep makefiles in alphabetical order
Recording surfaces were at first called meta surfaces. When the name
was changed, makefiles were not updated to keep alphabetical order.
2011-01-01 13:05:12 +01:00
Andrea Canciani
8f598dd69d quartz: Use native PDF blend modes
Quartz supports PDF blend modes since 10.4 and exposes Porter-Duff
compositing operators through the public API since 10.5.
2011-01-01 12:54:32 +01:00
Andrea Canciani
65040d3e3f test: Add bug-extents
Add a test for the computation of approximate extents used by most
backends to esimate the region affected by drawing operations.

Based on:
http://lists.cairographics.org/archives/cairo/2010-December/021331.html
2010-12-14 22:18:27 +01:00
Andrea Canciani
c05135a348 test: Update ref images
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.
2010-12-13 10:05:42 +01:00
Andrea Canciani
790d6140e7 test: Update reference images list
Some reference images were added or removed in
f85af7fe8d,
e2dcbfd895 and
670eb260eb, but Makefile.am was not
updated accordingly.
2010-12-13 09:43:13 +01:00
Andrea Canciani
17fef8c437 test: Add arc-infinite-loop
The handling of angles above 2pi in cairo_arc is not very solid and is
basically untested.

This test should ensure that huge inputs don't hang cairo.
2010-12-09 17:33:12 +01:00
Andrea Canciani
670eb260eb test: Add arc-looping-dash
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.
2010-12-09 17:33:12 +01:00
Andrea Canciani
1038973083 test: Add rectilinear-grid
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.
2010-11-28 15:42:08 +01:00
Adrian Johnson
e2dcbfd895 Automate error checking for ps-eps test 2010-11-23 23:13:50 +10:30
Andrea Canciani
425e68590b test: Remove old html infrastructure
The new dynamic html page supersedes the old make-generated static
html page.
2010-10-07 23:09:13 +02:00
Chris Wilson
05faebd584 test: Add a8-clear
Reported-by: Jeremy Moles <jeremy@emperorlinux.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-29 13:57:04 +01:00
Chris Wilson
04623ef9df test: Add subsurface-outside-target refs to REFERENCE_IMAGES 2010-09-06 13:15:55 +01:00
Krzysztof Kosiński
a7762e3d65 tests: Add linear-gradient-large test
Shows large rounding errors in Pixman when computing gradients. Added as
a test to Cairo to catch similar issues in other backends.

https://bugs.freedesktop.org/show_bug.cgi?id=29470
2010-08-10 18:38:59 +02:00
Andrea Canciani
8f38d2aa29 test: improve clip-*-unbounded tests
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>
2010-08-06 19:36:37 +02:00
Chris Wilson
8546a87788 test: Add partial-clip-text
This exercises a bug found by Igor Nikitin:

  https://bugs.freedesktop.org/show_bug.cgi?id=29008
2010-07-12 16:33:38 +01:00
Chris Wilson
01380f3a56 test: Missing REFERENCE_IMAGES 2010-07-12 11:50:42 +01:00
M Joonas Pihlaja
fca8977219 build: Rework pthread detection.
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.
2010-07-11 21:40:26 +03:00
Chris Wilson
0f1ff0daab test: Missing ref image. 2010-06-26 14:32:27 +01:00
Soeren Sandmann
5c7e1dd690 test: Add an example of seams.
A pair of perfectly conjoint quads should not produce a seam when
accumulating into a temporary mask. Yet here is an example of where they
do!
2010-06-24 10:13:22 +01:00
Chris Wilson
f2645fa361 test: Add a1-bug
Capture a bug report from "cairouser" where a1 rasterisation is now
broken.
2010-06-17 15:46:50 +01:00
Chris Wilson
c0dee7964c test: Add a1-rasterisation
Check the rounding criteria when rasterising.
2010-06-17 08:55:19 +01:00
Chris Wilson
8689d75caa test/halo: Transformation seems key to the bug...
Only it is actually transformation of the result that is required in
order to magnify the effect to a detectable level.
2010-06-16 15:40:42 +01:00
Chris Wilson
56d06b088b test: Add an aliasing test case.
Just a simple test in drawing neighbouring edges and looking for the
effects of aliasing.
2010-06-14 22:58:38 +01:00
Chris Wilson
4b39f02bf7 test: Add halo
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.
2010-06-14 20:40:56 +01:00
Andrea Canciani
b612a23086 test: update quartz ref images in makefile 2010-06-13 12:30:11 +02:00