Commit graph

173 commits

Author SHA1 Message Date
Chris Wilson
3d482e266f test: Exercise bug in joining together spline segments around cusps
Carl Worth demonstrated a glaring bug in the new stroking code,
introduced in commit 545f30856a (stroke: Convert the outlines
into contour and then into a polygon), whereby only a bevel join was
being used to connect segments around a sharp inflection point.

This adds the two examples he reported to the test suite.
2012-06-24 11:53:09 +01:00
Chris Wilson
7b2f787d19 test: Exercise rectangular bo bug
Reported-by: S. Christian Collins <s_chriscollins@hotmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49446
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-23 11:50:34 +01:00
Chris Wilson
0c14ce6dca test: Exercise degenerate dashes that are wholly solid
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-29 13:56:43 +01:00
Chris Wilson
d2f740ccbd test: Exercise clip inversion imperfections
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-29 12:40:10 +01:00
Chris Wilson
5ff32f70c1 test: Add rectilinear-dash-scale
Exercise rectilinear dashes under a non-uniform scale factors.

References: https://bugs.freedesktop.org/show_bug.cgi?id=48818
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-04-18 15:29:00 +01:00
Chris Wilson
5b3d878c82 test: Add test case for tracking source operator extents 2012-03-29 00:51:46 +01:00
Chris Wilson
050c246174 test: Add record90 to exercise replaying a rotated recording surface
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-28 17:38:21 +00:00
Chris Wilson
78aeb0d14c test: Verify scaled replay of a recording surface
After this works, we may also like to check simple rotations and an
affine transform.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-27 14:47:25 +00:00
Adrian Johnson
2de75b1a34 test: add test to check that pdf transparency groups are non-isolated 2012-02-25 16:53:26 +10:30
Andrea Canciani
2bb441fd11 test: Add stride-12-image
Add a test to check that all the backends can handle images with a
stride that is not width * 4.
2012-01-15 14:29:25 +01:00
Andrea Canciani
45d9659665 test: Add negative-stride-image
Add a test to check that all the backends can handle images with
negative stride.
2012-01-12 11:53:16 +01:00
Chris Wilson
20a1676c28 test: Add arc-direction
A simple example of how to draw arcs.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-11 12:43:43 +00:00
Adrian Johnson
fefc273c53 test: add fallback
to get a fallback resolution test included in index.html
2012-01-08 21:12:17 +10:30
Chris Wilson
c7565eeda0 test: Exercise copy/filling unsorted rectangles
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>
2011-12-06 19:02:45 +00:00
Chris Wilson
8844d50308 Convert cairo_mime_surface_t to cairo_raster_source_pattern_t
As discussed, overloading the cairo_surface_t semantics to include
sources (i.e. read-only surfaces) was duplicating the definition of
cairo_pattern_t. So rather than introduce a new surface type with
pattern semantics, start along the thorny road of extensible pattern
types.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-11-25 10:35:42 +00:00
Andrea Canciani
97b219a5e7 test: Re-enable pass-through
The pass-through test was not updated to the current test conventions
and was not enabled in the Makefiles.
2011-11-12 20:49:08 +01:00
Uli Schlachter
9208df1630 test: Add text-antialias-subpixel-{,v}{bgr,rgb}
There were no tests for any subpixel order but rgb, so let's write something for
all four possibilities.

This is mostly copy&paste from test/text-antialias.c (and
text-antialias-subpixel-rgb does the same thing as text-antialias-subpixel).

Test for: https://bugs.freedesktop.org/show_bug.cgi?id=40456

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-13 13:40:20 +02:00
Chris Wilson
ea50ca6883 test: Add clip-polygons
To exercise the recent bug found in handling empty clip surfaces.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-12 15:10:34 +01:00
Uli Schlachter
4092e90be5 test: Add clip-double-free
This test tries to exercise a double free bug in the clipping code.

My webkit-based browser recently crashed a lot. Here is the reason why.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-09 09:33:37 +02:00
Uli Schlachter
38ce0850b8 test: Add mime-surface-api
This test checks if setting and unsetting mime data works correctly. E.g. this
verifies that we get the same pointer back which we passed in (=no copy made).

This test currently crashes in its last call to cairo_surface_get_mime_data().

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-04 21:00:23 +02:00
Chris Wilson
80fff70e6c test: Add clip-rectilinear
Exercise the clipping code with a rectilinear path (rather than a set of
boxes as per usual).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-30 16:31:06 +01:00
Chris Wilson
30eac7b2c5 test: Add line-width-large-overlap
Exercise the case of stroking a box with a pen wider than the box
itself, a variation on line-width-overlap suggested by Paulo Zanoni.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-29 00:24:18 +01:00
Chris Wilson
2c34f028a7 test: Exercise scaling from an atlas through a subsurface
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-23 13:37:51 +01:00
Adrian Johnson
b30b0c14cb test: Add stroke-pattern
Poppler renders the PDF output of this test correctly with cairo 1.10.2 but fails with current git.

Commenting out the cairo_translate makes the PDF output render correctly with current git.
2011-09-22 22:43:07 +09:30
Chris Wilson
f3a9a0c9e6 test: Add a1-fill
Capture the bug report:
https://bugs.freedesktop.org/show_bug.cgi?id=31604

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 16:25:45 +01:00
Krzysztof Kosinski
f09361cff1 test: Add radial-outer-focus
Numerical instability in the computation of gradients leads to random
results.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40918
2011-09-16 16:03:23 +01:00
Chris Wilson
0aabde2314 test: Add bug-bo-ricotz
Exercises an assertion failure found by Rico Tzschichholz.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 13:48:09 +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
Chris Wilson
af9fbd176b Introduce a new compositor architecture
Having spent the last dev cycle looking at how we could specialize the
compositors for various backends, we once again look for the
commonalities in order to reduce the duplication. In part this is
motivated by the idea that spans is a good interface for both the
existent GL backend and pixman, and so they deserve a dedicated
compositor. xcb/xlib target an identical rendering system and so they
should be using the same compositor, and it should be possible to run
that same compositor locally against pixman to generate reference tests.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

P.S. This brings massive upheaval (read breakage) I've tried delaying in
order to fix as many things as possible but now this one patch does far,
far, far too much. Apologies in advance for breaking your favourite
backend, but trust me in that the end result will be much better. :)
2011-09-12 08:29:48 +01:00
Uli Schlachter
70118ee119 test: Add tighten-bounds
In the spirit of the new big-{little,empty}-{box,triangle} tests, this test
combines various paths. However, these paths are not only filled but also used
for clipping, resulting in 120 different combinations.

No backend currently succeeds the test. The reference image is a gimp-ination of
the image and test-fallback results and thus certainly wrong. Feel free to fix.

Additionally, this makes the xcb backend die with an ugly failed assert.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-08-30 22:03:33 +02:00
Chris Wilson
7ae2708fc8 test: Add big-empty-triangle
One last variant to make sure we handle the case of the disappearing
unbounded triangle.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-29 15:58:28 +01:00
Chris Wilson
f71cfe84fe test: Add big-empty-box
Another variant on big-little-box, to make sure we trim the extents
before doing the empty unbounded fixup.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-29 15:58:20 +01:00
Chris Wilson
249c89c313 test: Add big-little-triangle
A variant on big-little-triangle to exercise the non-rectangular paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-29 15:58:09 +01:00
Krzysztof Kosiński
8d91de4926 test: Add test case from bug-40410
Exercises a case where we failed to fill a rectangle...
2011-08-26 23:04:01 +01:00
Chris Wilson
09d8fc926f test: Add clip-mixed-antialias
The wonders one sees when looking at webpages. Who knew people would be
so inventive with clips?

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-26 10:41:59 +01:00
Chris Wilson
bb3d06a5dc test: Add shape-general-concave
A discussion that we've been having is the use of contours in filling,
and for optimizing for convex contours in particular. A devious mind
quickly generates a shape using a convex "contour" whose hull is larger
than its area. This is due to the self-intersection of the "contour"
which if properly excised causes the contour to be classed as concave.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-20 16:14:13 +01:00
Chris Wilson
f8f25f52ec test: Add record-mesh
Test capture and replay of mesh patterns.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-20 13:09:41 +01:00
Chris Wilson
4226bfd695 test: Add big-little-box
This exercises the bug

  https://bugzilla.mozilla.org/show_bug.cgi?id=668921

which is caused by a failure to tighten the extents after tessellating
the path and the unbounded fixup is skipped as it is believed the path
covers the whole area.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-20 13:09:40 +01:00
Chris Wilson
2eeae45cc7 test: Add checkerboard
Simply tests the rendering of the checkerboard commonly used as a
background in the test suite.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-20 13:09:40 +01:00
Uli Schlachter
aeba5acbad test: Add a test that maps a huge surface
This test currently fails in the xcb backend if xcb-shm is enabled.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-08-18 16:34:44 +02:00
Chris Wilson
2220693a40 Introduce cairo_mime_surface_t
The mime surface is a user-callback surface designed for interfacing
cairo with an opaque data source. For instance, in a web browser, the
incoming page may be laid out and rendered to a recording surface before
all the image data has finished being downloaded. In this circumstance
we need to pass a place holder to cairo and to supply the image data
later upon demand.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-15 00:16:09 +01:00
Chris Wilson
99c129dd13 test: Add record-extend
Exercise the extend modes with a clipped paint, because once upon a time
we had a bug...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-10 14:53:07 +01:00
Chris Wilson
4236821d11 test: Add unclosed-strokes
Checks that coincident end-points are not converted to joins. It briefly
passed through my mind that was a good thing...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-07 09:02:46 +01:00
Chris Wilson
37e1a1b3ed test: Add a1-sample
Ensures that only a box that covers the centre pixel is filled with
antialiasing disabled.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-07 09:02:46 +01:00
Chris Wilson
61c0f67ee0 test: Add joins-retrace
The complexity in this shape is that the stroke is reversed upon
itself and retraces the same path in the opposite direction.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-06 11:12:23 +01:00
Chris Wilson
93c9d4cefb test: Add an loopy I-bar stroker test
A second relatively simple closed concave shape, all the better for
debugging with.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-06 10:29:08 +01:00
Chris Wilson
b280114c5e test: Add join-star, another stroker exercise
A simple convex shape, useful for debugging.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-06 09:30:54 +01:00
Chris Wilson
3424e91ec7 test: Add a couple of tests to exercise stroking of short tail segments
Are the reference images correct? Discuss.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-05 17:27:59 +01:00
Chris Wilson
dd73fe9262 test: Add world-map from the perf-suite
As we use this a performance benchmark, it behooves us to check that we
are rendering it correctly.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-05 09:59:02 +01:00
Chris Wilson
953a4a2e55 test: Add an test case to exercise overlapping caps between dash segments
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-02 14:36:45 +01:00