Commit graph

2310 commits

Author SHA1 Message Date
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
2e75bf5a25 test: Fix operator-alpha-alpha
The test is checking the compositing of color-alpha sources although
it was meant to check the compositing of alpha-only sources on
alpha-only destinations.

This commit fixes the code to respect the test description.
2011-01-19 11:52:40 +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
2af0b0f5da test: Add white-in-noop
Exercise an incorrect optimization in cairo-surface.c. It replaces
with a noop any region-based fill with solid white source and an IN
operator.
2011-01-17 10:59:33 +01:00
Andrea Canciani
6472864b2c test: Huge means more than MAX_INT
Cairo makes it possible to create gradients whose extreme objects are
defined with double precision coordinates, but it internally
represents them with 24.8 fixed point precision.

This shows that coordinates that don't fit the valid range are
mishandled and don't even trigger an error status.
2011-01-02 18:32:46 +01:00
Andrea Canciani
7b188f852e test: Make huge-* test gradients not within pixed_fixed_t range
Cairo represents gradients coordinate with 24.8 fixed point precision,
but pixman uses 16.16 fixed point coordinates.

This shows that cairo is currently unable to handle gradients with
coordinates which are valid for cairo but not for pixman.
2011-01-02 18:31:50 +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
b164187ff6 test: Extend pattern-get-type and pattern-getters for mesh patterns
Add testing for mesh patterns to pattern-get-type and pattern-getters.
2011-01-01 13:05:13 +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
Chris Wilson
07abd21a03 test/arc-infinite-loop: Random return value fun. 2010-12-15 15:32:19 +00: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
5996652364 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 21:03:31 +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
028797a729 test: Handle crashed tests
Crashed tests are reported as "CRASH!" in cairo-test-suite.log
2010-12-09 17:33:12 +01:00
Andrea Canciani
f832ff7f22 test: Fix ref images
The corners of the boxes in these ref images were not correct.
2010-12-02 10:28:46 +01:00
Andrea Canciani
7b29f1d5d8 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-12-02 10:28:08 +01:00
Andrea Canciani
4e60a164d4 test: Fix ref images
The corners of the boxes in these ref images were not correct.
2010-11-28 19:26:35 +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
f85af7fe8d Change fallback resolution test to use resolutions in multiples of 72
With integer aligned clipping the test output has no seams.
2010-11-28 03:39:05 +10:30
Adrian Johnson
126108a6ac Boilerplate: Set fallback resolution using force_fallbacks function
cairo_set_fallback_resolution() does not work when testing rgb24 surfaces
2010-11-28 03:38:42 +10:30
Andrea Canciani
e71588c80d test: Add romedalen images copyright information
romedalen.png and romedalen.jpg have been bundled into the test
suite without an explicit copyright notice.
2010-11-26 10:01:38 +00:00
Adrian Johnson
e2dcbfd895 Automate error checking for ps-eps test 2010-11-23 23:13:50 +10:30
Jeff Muizelaar
7237eb62be Sync get-path-extents test with the one on 1.10.
The problem fixed by e9bb70d2de
had already been fixed on master by always computing exact extents:
89e1261dd0
2010-11-10 14:21:58 -05:00
Uli Schlachter
b4e55b84e2 test/README: Change suggested screen size
The dash-state test needs a surface with a width of 1500 pixels. If the screen
size is smaller than that, the boilerplate backends that create a window on the
X server can't properly do their job because part of the window would be outside
of the screen. This means people should use a screen large enough for all the
needed test surfaces. 1680 seemed like a more-or-less realistic value here.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-07 12:54:54 +00:00
Jeff Muizelaar
e9bb70d2de Fix degenerate vertical path bounds.
6b77567b6e made vertical
path bounds with no area return extents of 0,0. This fixes
the problem by not assuming degenerate path bounds are 0,0
2010-11-05 11:40:00 -04:00
Andrea Canciani
ac7b2a9720 test: Fix get-path-extents
The test was considering all the empty rects equals, but this is
not correct when testing the results of cairo_path_extents().
2010-10-29 17:31:21 +02:00
Andrea Canciani
147fa7a2be test: Add romedalen images copyright information
romedalen.png and romedalen.jpg have been bundled into the test
suite without an explicit copyright notice.
2010-10-24 16:40:53 +02:00
Andrea Canciani
b661bc8712 test: Update ref images for radial tests
Pixman master now rasterizes radial gradients following the PDF
specification (see section 8.7.4.5.4 of PDF 32000-1:2008).
2010-10-12 20:13:53 +02:00
Adrian Johnson
dd96c4accb Refresh ft-show-glyphs-positioning pdf ref image
The new image is more accurate as a result of the fix in 165a14b5
2010-10-08 23:05:42 +10:30
Behdad Esfahbod
b50d9d0783 Fix typo 2010-10-07 17:41:36 -04:00
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
Andrea Canciani
f29e7d155f test: Add a new test result html page
This page uses JavaScript to parse test log files and create the
test table according to the results. It also allows dynamic selection
and hiding of rows/columns based on a chosen parameter and table
structure change, by dragging a field from rows to columns and vice
versa.

Left click selects the cells with the chosen parameter-value association.
If these cells are exactly the only show cells, it hides them and shows
all the other ones, instead.

Right click inverts the visibility of the cells with the chosen
parameter-value association.

When some rows are hidden, the PASS/NEW/FAIL/XFAIL/CRASH counters show
both the currently shown test case count and the total count, if they are
different: "23[62]" means that there are 62 test case in that category,
but only 23 are currently visible.

Dragging a field from the row (or column) header to the column (or row)
header rebuilds the table to have that field along the columns (or rows),
updating PASS/NEW/FAIL/... counters and showing the whole table again.

Test names are hyperlinks to the test log.
Images are hyperlinks to themselves.
2010-10-07 23:09:13 +02:00
Andrea Canciani
4e064b3a32 test: Make tests run in natural order
When tests are registered, they are prepended to a list.
Reverting the list, we get a list whose order is the same as that
of registration.
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
Andrea Canciani
291876ad34 test: do not leak resources
Silence some leak reports by check-valgrind.
2010-09-10 07:34:43 +02:00
Andrea Canciani
ca775cbf5a test: do not leak resources
Silence two leak reports by check-valgrind.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-09 17:24:13 +02:00
Chris Wilson
04623ef9df test: Add subsurface-outside-target refs to REFERENCE_IMAGES 2010-09-06 13:15:55 +01:00
Chris Wilson
d5b2c2a12e test: Rename clip-fill-*-unbounded.image16 ref to match REFERENCE_IMAGES 2010-09-06 13:11:22 +01:00
Benjamin Otte
f54c51e75c test: Add subsurface-outside-target
This test defines the behavior of subsurfaces when they are created to
be bigger than their target.
2010-09-01 03:16:22 +02:00
Andrea Canciani
cd52378ae6 test: Update linear-gradient-large ref image
Make linear-gradient-large ref image match xlib gradients (both on nvidia
and on macosx) and pixman gradients (when patched to compute the linear
gradients using floating point math).
2010-08-10 19:42:14 +02: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
ae2b7b13cd pattern: Simplify degenerate linear pattern to solid colors
Degenerate linear patterns are considered clear if they have
EXTEND_NONE, the average of the first and the last stop if they are
EXTEND_PAD, the weighted average of the stops (based on the size of
the interpolation range in which they are active, just like integrating
over the whole interpolation range and taking the average) if they are
EXTEND_REPEAT or EXTEND_REFLECT.

Fixes degenerate-linear-gradient
2010-08-08 12:07:08 +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