Commit graph

2310 commits

Author SHA1 Message Date
Chris Wilson
2c908f8a42 test: Regenerate reference images for vanilla record tests
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-28 17:59:13 +00: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
1cfd27851e test: Set record2x-fill-alpha as an xfail
As the path is converted to fixed-point prior to application of the
replay scale factor, we currently do anticipate some loss in precision
and slight difference in antialiasing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-27 15:14:33 +00:00
Chris Wilson
668e8eac3a test/record: Fix typo in record*-text-transform
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-27 15:14:33 +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
Chris Wilson
99ec915b97 test: a1-line-width is a test of rasterisation, so skip for the vector backends
PDF/PS do not have the concept of aliased rendering, so like many of the
other rasterisation tests, a1-line-width cannot be tested satisfactorily
on those backends.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-24 14:30:14 +00:00
Chris Wilson
61050f5445 test: Add a couple of reference images for the recording surface
In tests where we apply a scale factor to a similar source, the
recording surface will produce different results to image as the scaling
of the source is performed on the geometry and not on a raster image and
so avoids scaling artefacts.
2012-02-24 13:56:41 +00:00
Andrea Canciani
d95cf87c03 boilerplate: Use any2ppm from ANY2PPM env variable
If the environment variable ANY2PPM is set, use it as the path to the
any2ppm program. Otherwise, default to "./any2ppm" as before.

This makes it possible to set the ANY2PPM variable in the
Makefile.win32 build system, which makes it possible to use the "test"
target on the script backend.
2012-02-23 00:16:44 +01:00
Chris Wilson
08de30d8b5 test: Add a set of reference images for the mask-based compositor
Serves as another reference for some xlib targets.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 10:51:30 +00:00
Chris Wilson
3d499ea901 xlib: Replace obsolete disable-xrender with shiny new device debug interface
As prototyped with xcb.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 10:41:37 +00:00
Chris Wilson
73df8eb8db test/xlib: Remove stale reference images
We know have a swrast reference compositor for xlib (test-traps) and so
should not need these old xlib specific reference images.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 10:19:18 +00:00
Chris Wilson
cd4fd8a802 test: Update traps for changes in reference font 2012-02-22 10:11:16 +00:00
Chris Wilson
c9f18bb034 test: Update base reference images for new reference font
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 10:09:05 +00:00
Chris Wilson
da8841cc5e test/README: Update sha1sums for fonts used
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 09:30:32 +00:00
Chris Wilson
f4908b3848 test: Refresh reference images for antialiasing fix
Having discovered that I had recreated the references images with a
buggy rasteriser, we now need to recreate them with the correct reference
settings.
2012-02-20 11:24:17 +00:00
Andrea Canciani
93b0fcffc7 test: Create output directory even on Win32
This avoids cluttering the test directory with thousands of PNG files
and makes the behavior more consistent with other OSes.
2012-02-16 23:00:59 +01:00
Andrea Canciani
80c46d400b test: Fix any2ppm on MSVC
C99 initialization is not allowed.

Error macros are used even in the non-daemon version, hence errno.h
should always be included.

Fixes:

any2ppm.c(107) : error C2065: 'EINTR' : undeclared identifier
any2ppm.c(107) : error C2051: case expression not constant
any2ppm.c(108) : error C2065: 'EAGAIN' : undeclared identifier
any2ppm.c(108) : error C2051: case expression not constant
any2ppm.c(271) : error C2059: syntax error : '.'
2012-02-16 23:00:59 +01:00
Andrea Canciani
b2d978a815 test: Compile any2ppm on Windows
any2ppm is required in order to test the script backend.
2012-02-16 23:00:59 +01:00
Chris Wilson
f4309795e9 test: Referesh traps (xlib) reference images for font updates
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-09 13:41:55 +00:00
Adrian Johnson
46ca65895f ps: support RASTER_SOURCE patterns 2012-01-31 23:53:45 +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
Adrian Johnson
284cba1f37 test: add push/pop group to fallback test 2012-01-15 21:18:43 +10:30
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
Andrea Canciani
5ce6e02793 test: Use fork() on MacOS X
MacOS X 10.7 (and maybe some previous versions, too) can fork()
processes which use CoreGraphics. This makes it possible for
cairo-test-suite to withstand a test crash without killing the whole
suite.

The old behavior is still available using the '-f' (foreground)
option.
2011-12-15 13:04:02 -08:00
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
d60a2930e1 test: reference ref images after tweaking polygon clipping 2011-12-06 14:56:49 +00:00
Uli Schlachter
9ec5e9fee6 xcb: Fixup some internal state in set_{drawable,size}
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-12-05 22:48:56 +01: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
1501c86536 test: Do not open files in non-existing dirs
The output directory should be made before trying to open log files in
it.

Fixes the bug causing cairo-test-suite to log to stderr on the first
run (i.e. when test/output does not exist).
2011-11-12 20:49:08 +01:00
Andrea Canciani
603ea229b5 test: Use cairo_test_list_t for the main test list
Instead of embedding the pointer in the test structure, consistently
use the cairo_test_list_t structure for test lists.

This cleans up the code as the reverse-list operation can be reused.

Moreover this makes the code clearer, because each test list is now
independent and has no way to know about other test lists.
2011-11-12 20:49:08 +01:00
Andrea Canciani
de6a1e68fe 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-11-12 20:49:08 +01:00
Andrea Canciani
c65d4e35dc Use xstrdup instead of xmalloc when possible
Don't open code xstrdup, just use it.
2011-11-12 20:49:08 +01:00
Andrea Canciani
6dfb12c7d7 test: Reuse cairo_test_logv()
cairo_test_log() can be implemented on top of cairo_test_logv() to
ensure that their behavior is consistent.
2011-11-12 20:49:08 +01:00
Andrea Canciani
549b1f8d4b boilerplate: Remove unused thread id parameter
The thread id is not used anymore (it is always == 0), so it can be
removed.
2011-11-12 20:49:08 +01:00
Andrea Canciani
b07b242220 test: Remove unused thread field
The multi-threaded test path does not exist anymore and the ctx->thread
field is always 0, hence it can be removed.
2011-11-12 20:49:08 +01:00
Andrea Canciani
6ef9779a6f test: Remove dead code
This code is unused and can be removed.
2011-11-12 20:49:08 +01: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
Andrea Canciani
c8b5d270f6 Improve the documentation of the flags
Some utilities were providing incorrect or incomplete usage
information.
2011-11-12 20:49:08 +01:00
Andrea Canciani
6a0ba30303 Sort option flags
Keep the option flags in alphabetical order. This makes it easier to
check for collisions or missing handlers.

Avoids an internal error when passing flags -c, -r or -v to
cairo-analyse-trace.
2011-11-12 20:49:08 +01:00
Andrea Canciani
f96e78fa54 Silence some 'unused var' warnings 2011-11-09 13:56:50 +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
b9e5cd9572 create-from-png*: Test mark_dirty with mime data
This currently hits the following assertion:

lt-cairo-test-suite: cairo-surface.c:1381: cairo_surface_mark_dirty_rectangle:
Assertion `! _cairo_surface_has_mime_data (surface)' failed.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41409

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-09 09:21:13 +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