Commit graph

1822 commits

Author SHA1 Message Date
Chris Wilson
9ab9d635cd test: Add ref image for random-clip
After applying geometric clip intersection, this is the acceptable
result.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-14 23:08:19 +01:00
Chris Wilson
8f9691f2b7 test: Fix ref images for a1-clip-*
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-14 23:06:31 +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
Adrian Johnson
dc2ed6dca2 Refresh some pdf/ps ref images 2011-09-13 22:29:56 +09:30
Chris Wilson
a6a48e0559 test: Update ref images
First pass after the recent turmoil in clip and antialias handling.
2011-09-12 15:44:47 +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
Paulo Zanoni
ee15e030d8 cairo-test-runner: don't leak argv
If CAIRO_TESTS is set, argv will be replaced by a xmaloc'ed variable. We
need to free it.

This can be easily detected by running:
CAIRO_TESTS=user-font make check-valgrind TARGETS=image

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-09 18:44:18 +01:00
Paulo Zanoni
572479ec20 test/README: add missing "S"
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-09 18:43:18 +01:00
Paulo Zanoni
669242c2c8 test: fix append_argv()
When I ran "CAIRO_TESTS=a1-bug make test", no test executed because of a
bug in append_argv(). The "olen" variable was assuming that we always
only append a single argument to argv and the resulting argc was also
wrong.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-09 18:43:15 +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
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
2134306eaf test: Extend rotate-image-surface-paint
Apply two common clipping methods just to add a little bit of further
complication.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-20 14:11:30 +01:00
Chris Wilson
9f6820210d test: Extend record-extend to exercise similar surface sources
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-20 13:09:41 +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
6b7539d96b test/xlib-expose-event: Be kinder to recording surfaces
And only create the source image once.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 20:54:24 +01:00
Chris Wilson
54c8e8ccfc test: Add a couple of variants to line-width-overlap
The bug may be in only the fast-path, but future bugs may lie elsewhere.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 16:21:08 +01:00
Chris Wilson
829eabfc95 test/line-width: Refactor and tidy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 16:21:08 +01: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
Chris Wilson
ccbd7281b2 test/line-width: Add a non-antialiased variant
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-13 09:30:05 +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
Uli Schlachter
7b97533221 map-to-image: Handle non-32bpp formats
Fixes: map-all-to-image, map-bit-to-image for image16

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-08-08 21:06:09 +02: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
d356deb182 test: Add a second ring to overlapping-dash-caps
Demonstrate a second artefact when using SQUARE.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-02 15:38:49 +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
Chris Wilson
c0407e84e9 test: Extend PDF blend tests to include an opacity mask
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-01 12:08:55 +01:00
Andrea Canciani
e04e368748 Remove useless checks for NULL before freeing
This patch has been generated by the following Coccinelle semantic patch:
// Remove useless checks for NULL before freeing
//
// free (NULL) is a no-op, so there is no need to avoid it

@@
expression E;
@@
+ free (E);
+ E = NULL;
- if (unlikely (E != NULL)) {
-   free(E);
(
-   E = NULL;
|
-   E = 0;
)
   ...
- }

@@
expression E;
@@
+ free (E);
- if (unlikely (E != NULL)) {
-   free (E);
- }
2011-07-31 16:46:36 +02:00
Chris Wilson
b231bb0a0b test: Exercise extend modes with recording patterns
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-31 08:12:54 +01:00
Andrea Canciani
de25fec06b test: Improve horizontal-clip
The bug pointed out by this test now causes failures in xcb and xlib.
2011-07-28 18:11:27 +02:00
Andrea Canciani
80b7a1aa9b test: Update image references
Makefile.refs was missing some images.
2011-07-28 18:11:27 +02:00
Chris Wilson
1b888c4c3a test: Add horizontal clip test
Doesn't actually hit the code path but it should...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-27 19:49:47 +01:00
Chris Wilson
a69335a84e API: map-to-image and create-similar-image
A common requirement is the fast upload of pixel data. In order to
allocate the most appropriate image buffer, we need knowledge of the
destination. The most obvious example is that we could use a
shared-memory region for the image to avoid the transfer cost of
uploading the pixels to the X server. Similarly, gl, win32, quartz...

The other side of the equation is that for manual modification of a
remote surface, it would be more efficient if we can create a similar
image to reduce the transfer costs. This strategy is already followed
for the destination fallbacks and this merely exposes the same
capability for the application fallbacks.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-26 14:55:58 +01:00
Chris Wilson
e4b3f84d4c test: Add clip-intersect
Exercises a bug in the unbounded drawing of an empty polygon...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-24 13:05:24 +01:00
Chris Wilson
4d5c95f629 test: Exercise replaying basic painting paths
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-24 11:50:48 +01:00
Chris Wilson
69e52c6707 tests: Another missing ref, this time clip-disjoint-hatching
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-23 15:51:49 +01:00