Commit graph

1900 commits

Author SHA1 Message Date
Chris Wilson
2f2bff038c buffer-diff - check for any errors whilst writing the png
Propagate any errors from writing out the png.
2007-04-09 15:08:45 +01:00
Behdad Esfahbod
e8072e6e0a [test,perf] Make them rebuild boilerplate when src is changed 2007-04-08 22:03:46 -04:00
Chris Wilson
5c24711ee6 Restore gcov functionality
Add -lgcov to the shared library else the test programs fail to link.
Add a couple of lcov convenience targets to generate the coverage reports.
2007-04-04 10:13:13 +01:00
Behdad Esfahbod
114be945db [test] Add svg2pdf 2007-04-03 16:47:39 -04:00
Behdad Esfahbod
040c68cb2c [test] Make pdf2svg build (and distributed) 2007-04-03 16:23:35 -04:00
Behdad Esfahbod
17f5706d17 [pdiff] Make stdint.h inclusion portable (#10441)
by copying magic bits from cairo-wideint-private.h.
2007-04-03 16:04:04 -04:00
Brian Ewins
00cc443737 [test/degenerate-path] remove quartz reference image
The reference image is no longer the correct size, so isn't
providing a comparison at all. In the absence of a better
replacement, removing it at least gives us diffs.
2007-03-26 21:44:33 +01:00
Behdad Esfahbod
820341b4c5 [test/nil-surface] Test that cairo_get_target() returns non-NULL 2007-03-21 15:44:18 -04:00
Behdad Esfahbod
52341f7e85 [test/nil-surface] Test cairo_create(NULL). Crashing in cairo_push_group! 2007-03-21 15:21:05 -04:00
Chris Wilson
9b53bc7c65 Cache solid patterns
We use a small cache of size 16 for patterns created from solid colors,
e.g. cairo_set_source_rgb(). This helps with toolkits that draw many
widgets using the same colour scheme.

The cache uses a static index variable, which itself acts like a cache
of size 1, remembering the most recently used colour. So repeated
lookups for the same colour hit immediately. If that fails, the cache
is searched linearly, and if that fails too, a new pattern is created
and a random member of the cache is evicted.
2007-03-20 18:21:53 -04:00
Carl Worth
2483542b74 Add skew-extreme-ref.png to the tar file for the release. 2007-03-19 23:37:28 -07:00
Carl Worth
1401f20eb9 Temporarily remove extend-reflect from the list of tests.
This test is known to sometimes cause an X server to enter a near-
infinite loop. That's a reall unkind thing to inflict upon our
users who are being nice enough to test cairo. Let's disable
this test for the 1.4.2 release.
2007-03-19 22:39:40 -07:00
Carl Worth
23caa0f43b Add line-width-zero test which currently crashes.
The crash is described in this bug report:

	Crash in cairo_stroke_extents whe line width is 0 and line cap is ROUND
	(_cairo_pen_find_active_cw_vertex_index)
	https://bugs.freedesktop.org/show_bug.cgi?id=10231
2007-03-15 22:09:32 -07:00
Carl Worth
3d3173d176 Add svg-specific reference image for radial-gradient test.
This isn't strictly needed, (pdiff allows the test to pass without the
image), but it sure runs faster this way.
2007-03-14 17:19:48 -07:00
Carl Worth
0a6ae06c35 Add new skew-extreme test case.
This test currently fails, demonstrating the bug reported here:

	Skew transforms were broken by the cairo update in December
	https://bugzilla.mozilla.org/show_bug.cgi?id=373632
2007-03-14 15:06:36 -07:00
Carl Worth
40b6d8842e Remove radial-gradient test from XFAIL list
This test has not been failing since the fix in:

	772edc9133

So get rid of the '1 unexpected passes' complaint.
2007-03-14 15:06:36 -07:00
Behdad Esfahbod
f3c8d82d6d [test] If backends are limited and all untested, pass the test
This is necessary to ensure that limiting backends using
CAIRO_TEST_TARGET does not increase the number of tests failing,
which is a desirable invariant.
2007-03-13 16:51:34 -04:00
Behdad Esfahbod
30b5f1baa8 [test] In pattern-getters test, log what went wrong 2007-03-13 16:50:10 -04:00
Behdad Esfahbod
5d28bf605f [test] Make pdiff if necessary 2007-03-13 05:14:19 -04:00
Chris Wilson
14cab8b020 Correct an off-by-one in the reflection of the convolution index.
Currently the convolution code uses the formula 2*(N-1)-n to reflect the index
n when n is greater than or equal to N.
This is wrong as n=N -> 2*(N-1)-N = N-2 instead of N-1.

Furthermore when the image is small, e.g. at the highest levels of the
pyramid, this causes the code to index before the start of the array and
causes valgrind to issue a warning.
2007-03-12 14:48:11 -07:00
Carl Worth
2f4ddc85a5 Mark 5 tests that are currently failing as XFAIL (that is, not to be fixed before 1.4)
The 5 additional bugs that will be shipped with 1.4 are

	ft-text-vertical-layout-type1
	radial-gradient
	surface-pattern
	surface-pattern-scale-down
	surface-pattern-scale-up

Most of these are non-issues, (unbundled font for
ft-text-vertical-layout-type1), or very minor issues (radial-gradient
and surface-pattern). The only things in here that look like a real
bug are the surface-pattern-scale-down and surface-pattern-scale-up
tests where the xlib backend results have some non-1.0 alpha that is
very unexpected.
2007-03-05 22:48:27 -08:00
Behdad Esfahbod
393908c34d [test] Modify extend-reflect to need a smaller reference image 2007-03-05 19:23:10 -05:00
Behdad Esfahbod
4716ed760c [test] Remove some ref images from random-intersections
Each one is larger than 100kb, so paint background black to reuse
same ref image for rgb24 and argb32 cases.  Also remove Quartz ref
images for now.
2007-03-05 19:23:10 -05:00
Behdad Esfahbod
feba319413 [test] Remove unused variable 2007-03-05 19:23:10 -05:00
Behdad Esfahbod
b63f5ae58f [test] In the bitmap-font test, break cairo_text_path() call into two
such that it checks current-point handling after that call.  It fails now,
because cairo_text_path does not set current-point explicitly.
2007-03-05 16:15:09 -05:00
Dave Yeo
d6ac9b4770 [test] Fix build on Win32 2007-03-05 13:36:32 -05:00
Mathias Hasselmann
ffa86b17ab [test/pdiff] Fix build problem with certain flavors of make 2007-03-04 16:39:00 -05:00
Behdad Esfahbod
9aecd7c815 [test] Include romedalen.png in dist, oops 2007-03-03 00:05:40 -05:00
Behdad Esfahbod
8a69a32795 [test] Update list of refrerence images 2007-03-02 23:29:54 -05:00
Behdad Esfahbod
a0bc2ada78 [test] Support passing extra valgrind flags
using EXTRA_VALGRIND_FLAGS make variable or CAIRO_EXTRA_VALGRIND_FLAGS
env variable.
2007-03-02 15:45:02 -05:00
Carl Worth
8c579ef835 More tightening of test cleanup to avoid valgrind complaints. 2007-03-02 12:30:14 -08:00
Carl Worth
9854d01a8d Fix leak in pattern-getters test (missing cairo_pattern_destroy) 2007-03-02 11:32:47 -08:00
Carl Worth
b52dda62fe Augment cairo_test_init with cairo_test_fini to avoid leak
Without this, any tests that were using cairo_test_init rather than
cairo_test would end up leaking a FILE* for the log file. So this
keeps valgrind much more happy with the test suite.
2007-03-02 11:31:13 -08:00
Carl Worth
7d6e21c7e2 Add even more XrmGetFileDatabase leaks to the valgrind suppressions file 2007-03-02 11:29:40 -08:00
Carl Worth
e054314e5e Add a couple of missing test cases to .gitignore 2007-03-02 09:34:46 -08:00
Carl Worth
02f2ece88d Fix leak in pdiff lpyramid
This was a leak in the test suite only, (and then only when tests failed).
2007-03-02 09:32:14 -08:00
Carl Worth
36590fd470 Add test of cairo_get_* after INVALID_RESTORE to nil-surface
This new test demonstrates a crash condition as reported here:

	evolution crash to _cairo_gstate_backend_to_user()
	https://bugs.freedesktop.org/show_bug.cgi?id=9906
2007-03-02 03:43:46 -08:00
Carl Worth
df2d42ac7f Merge branch 'radial-gradient-fixes' into cairo 2007-03-01 17:08:03 -08:00
Behdad Esfahbod
4ee6cda6e5 [test] Move .la dependencies around 2007-03-01 19:13:19 -05:00
Behdad Esfahbod
4b1f450f4c [test] Add more valgrind suppressions 2007-03-01 18:36:27 -05:00
Behdad Esfahbod
2acd5b5277 [test] Add leak-revealing path to rectilinear-stroke
Based on this thread:
http://lists.freedesktop.org/archives/cairo/2007-March/009860.html
2007-03-01 18:34:53 -05:00
Behdad Esfahbod
bd2cd2c868 [test] Plug a leak in the test suite 2007-03-01 18:14:33 -05:00
Carl Worth
d65455ed38 Add radial-gradient test case
Embarrassingly enough, the test suite previously never called
into cairo_pattern_create_radial at all. Unsurprisingly, this
has led to bugs creeping into the radial gradient implementation.
2007-03-01 13:16:38 -08:00
Behdad Esfahbod
07d61af809 [paginated] Automatically issue a final cairo_show_page()
This means, PS/PDF/SVG do not need the final cairo_show_page() anymore.
If there is any drawing in the page, a cairo_show_page() is done
automatically.
2007-02-28 13:46:27 -05:00
Behdad Esfahbod
ed75e24898 Implement cairo_get_scaled_font() 2007-02-27 20:09:46 -05:00
Behdad Esfahbod
153465bfe5 [test] Add ref images for new tests 2007-02-27 19:28:37 -05:00
Behdad Esfahbod
de0a6522b0 [test] Add tests that show xstep/ystep failures in PS/PDF backends
with surface patterns.  One test scaled the pattern up, another scales
down.  We observe that both PS and PDF are broken when scaling down.
This is the reason that PDF is failing in the fallback-resolution test
too.
2007-02-27 17:33:17 -05:00
Behdad Esfahbod
2d908e6a95 [test] Add a new, XFAIL, extend-pad test 2007-02-23 17:26:43 -05:00
Behdad Esfahbod
289ac33fa2 [PS] Fix surface patterns with transforms
Previously we were generating an image object with the desired
transform and then a pattern with only a translation.  This means,
the pattern was alwasys axis-aligned.  Obviously this does not
work correctly with repeated rotated patterns.

We now use an identity matrix for the image and put all the
pattern transformation (well, it's inverse) into the pattern.
This fixes the issue nicely.

The surface-pattern test is still failing even with a reference
image, because the gs rendering of the normal case and the
device-offset=25 case are different and both have seams.
2007-02-23 17:26:43 -05:00
Behdad Esfahbod
16013ced09 [test] Remove non-existing test extend-pad 2007-02-23 17:26:42 -05:00