Commit graph

1900 commits

Author SHA1 Message Date
Vladimir Vukicevic
6db219c3a1 [win32] clean up win32_surface_composite
Make sure that all operations are correct (the operations chosen
are listed in cairo-win32-surface.c); in particular, deal with the extra
byte present in FORMAT_RGB24 surfaces correctly.

Also adds support for calling StretchDIBits to draw RGB24
cairo_image_surfaces directly.
2006-11-07 13:12:09 -08:00
Carl Worth
777eaf326a test/Makefile.am: Fix typo in EXTRA_DIST that was breaking distcheck 2006-11-07 01:33:40 -08:00
Jamey Sharp
b0f5af3b47 Add clip-push-group to .gitignore. 2006-10-29 10:59:30 -08:00
Christian Biesinger
a34ba73136 [beos] Allow a pixel error of 1 for BeOS tests
That allows us to delete the BeOS-specific reference images.
2006-10-27 23:51:56 +02:00
Ian Osgood
acac0c1966 don't squish tiny images in test/index.html 2006-10-26 09:57:32 -07:00
Carl Worth
76f816c765 test/paint-repeat: Use offset larger than source surface for better stress testing 2006-10-25 12:52:02 -07:00
Carl Worth
06d3786b2c Add new paint-repeat test
I added this test originally to make it easier to debug
some recent bugs, (the test suite did have some repeating
in the checkered backgrounds, but with an offset of 0,
and then also in trap clip with an offset larger than the
surface itself). This test exercises repeating more directly.

It also triggers a bug in the PostScript backend that I've
not yet investigated. So the test does fail currently.
2006-10-25 12:52:02 -07:00
Behdad Esfahbod
7421e8af0c [test] Make sure tests are not relinked unnecessarily
What was causing it was making all tests depend on all, to make sure
../boilerplate is built first.  I'm not making all tests depend on
../boilerplate/libcairoboilerplate.la and ../src/libcairo.ls and added rules
to build those (by changing dir and making them).
2006-10-25 15:29:00 -04:00
Carl Worth
670b3ce243 test: Update reference images due to previous change to _cairo_color_compute_shorts
The previous change was in b62710d4f8
We just forgot to update the reference images at the time so there
have been false failure results in the test suite until now.
2006-10-23 12:46:25 -07:00
Carl Worth
f894ebf980 clip-push-group: Adjust test slightly to ensure mask-based clip is not anchored at the origin
This should help us test if there's an offset problem in copying
the mask-based clip during cairo_push_group.
2006-10-19 15:45:53 -07:00
Carl Worth
f880f5e57b test: Add clip-push-group to demonstrate crash in cairo_push_group
The crash happens anytime mask-based clipping is in effect
at the time of cairo_push_group. The crash was first reported
here:
	http://lists.freedesktop.org/archives/cairo/2006-August/007698.html
2006-10-19 15:43:02 -07:00
Carl Worth
40e1c0246d Add neglected reference images for infinite-join test 2006-10-18 15:18:11 -07:00
Carl Worth
e21c155e73 Merge branch '8379' into cairo 2006-10-18 15:03:04 -07:00
Carl Worth
5b7a7f39ad test/infinite-join: Modify to draw something visible, and make the output a more reasonable size.
The modification was performed with care to ensure that the bug
is still exercised. Also, reference images are added.
2006-10-18 15:01:58 -07:00
Jamey Sharp
f7068de7f7 Update .gitignore in boilerplate and test. 2006-10-12 23:47:37 -07:00
Carl Worth
78ad834d81 Fix typo of , instead of || which was causing a test to be ignored
Thanks to a gcc warning for catching this one, (statement with
no effect, or similar).
2006-10-12 14:21:55 -07:00
Vladimir Vukicevic
cd6b44e9c9 [test] Fix composite-integer-translate-over test
This test wasn't translating by an integer, but instead by 5.5.  Fixed
test and reference image.
2006-09-29 14:44:00 -07:00
Carl Worth
e4dc73ab1c Rename test from stale path-data name to copy-path 2006-09-26 15:48:06 -07:00
Carl Worth
5f833c134b Fix cairo_copy_path and cairo_copy_path_flat to propagate errors.
One of these functions was already documented to be doing this, and
the other one should have been. Now the documentation and behavior
for both are consistent, (and the path-data test case verifies this).
2006-09-26 15:48:06 -07:00
Robert O'Callahan
191e108b93 Add clip getters API + tests
Add new public API methods:

void cairo_clip_extents (cairo_t *cr,                                               double *x1, double *y1,
    double *x2, double *y2);
cairo_rectangle_list_t *cairo_copy_clip_rectangles (cairo_t *);
void cairo_rectangle_list_destroy (cairo_rectangle_list_t *);

Also add 'get-clip' and 'get-path-extents' tests.
2006-09-25 23:22:45 -07:00
Carl Worth
8744929030 Add test case from bug #8379 demonstrating infinite loop during round join 2006-09-21 15:13:47 -07:00
Vladimir Vukicevic
303b529195 dash and pattern getter functions
Adds API functions for inspecting the current dash state, as well as
the contents of pattern objects:

  cairo_get_dash
  cairo_get_dash_count
  cairo_pattern_get_rgba
  cairo_pattern_get_surface
  cairo_pattern_get_color_stop_rgba
  cairo_pattern_get_color_stop_count
  cairo_pattern_get_linear_points
  cairo_pattern_get_radial_circles
2006-09-19 12:19:21 -07:00
Vladimir Vukicevic
a56b962428 Add win32 output files to gitignore 2006-09-19 12:19:21 -07:00
Vladimir Vukicevic
924bbd06f3 Check for valid path status value before calling _cairo_set_error
cairo_status_t is a signed type, so we need to check for invalid codes
that are < 0 as well.

Also removes the MSVC goop in path-data.c that was attempting to work
around the assert earlier.
2006-09-11 12:36:41 -07:00
Vladimir Vukicevic
e1a8a8b65a [win32] Set win32 assertion failure handlers for tests to stderr
assert() will default to displaying a dialog box, which makes it hard
to run tests automatically.  Set the reporting mode to only report
to stderr in cairo_test(), and in path-data, since that triggers
an early assert.
2006-09-09 23:54:40 -07:00
Vladimir Vukicevic
00d5a2ed48 [win32] Makefile.win32: use correct (/MD) runtime library flag everywhere
There was a bad mix of LIBCMT (the static runtime lib) and MSVCRT (the dynamic
one) before, because LIBCMT is the default.  This specifies /MD everywhere.
2006-09-09 23:29:17 -07:00
Vladimir Vukicevic
d78fd375d3 [win32] Makefile.win32: fix test and add html targets
Add html target to toplevel and test/ Makefile.win32
2006-09-09 22:18:47 -07:00
Vladimir Vukicevic
d3076a1843 Merge branch 'master' of git+ssh://git.cairographics.org/git/cairo into cairo-master 2006-09-09 18:57:57 -07:00
Vladimir Vukicevic
9735cb9a24 Improve make-html.pl, add self-contained output format
Setting CAIRO_TEST_SHOW_INLINE in the environment before running
make-html.pl will generate a html file with all the logs and necessary
images inlined as data URI's.
2006-09-09 18:55:46 -07:00
Carl Worth
aeca64f6cd boilerplate: Allow targets to distinguish between test and perf.
Add a new cairo_boilerplate_mode_t so that the boilerplate targets can
do slightly different things if being tested for correctness vs. being
run for performance.
2006-09-09 17:32:50 -07:00
Vladimir Vukicevic
97f26c5235 Merge branch 'master' of git+ssh://git.cairographics.org/git/cairo into cairo-master 2006-09-09 17:09:03 -07:00
Vladimir Vukicevic
0e59041321 [win32] win32-specific Makefiles for building with MSVC
This patch adds a bunch of makefiles for building cairo with Visual C++.
gnu make is still required, and make must be run from a command prompt
that has the Visual C++ paths set up, as well as has the cygwin environment
in the path.  Run 'make -f Makefile.win32'.
2006-09-09 17:08:18 -07:00
Vladimir Vukicevic
3c5a02c3ed [win32] Misc win32 compilation fixes
Fix win32/MSVC defines for snprintf, inline, and M_PI
2006-09-09 17:06:21 -07:00
Carl Worth
416e94532b test/bitmap-font: Fix arguments to FcFreeTypeQuery to avoid warnings. 2006-09-09 16:04:51 -07:00
Carl Worth
195fd5cde6 boilerplate: Rename cairo_test_target_t to cairo_boilerplate_target_t 2006-09-09 16:04:51 -07:00
Carl Worth
3a92ab69c8 test: Report details errors when image output files cannot be found. 2006-09-07 13:09:25 -07:00
Behdad Esfahbod
3d398b1a21 [test/Makefile] Unset DIST_SUBDIRS 2006-09-06 13:49:53 -04:00
Carl Worth
bcb7863f00 Move target tolerance to cairo_test_target structure (should let single-pixel SVG errors pass)
Previously we were setting the target tolerance based on the surface
type. But that doesn't work as multiple backends will provide a surface
of type meta. So instead we put the tolerance as a value in the
cairo_test_target data structure.

With this change, some single-pixel errors of 1 in the SVG backend
should now be ignored.
2006-09-05 22:25:21 -07:00
Benjamin Otte
2ebb9af434 boilerplate: Fix compilation for glitz. 2006-08-31 13:30:10 -07:00
Behdad Esfahbod
7ad6e94101 [test] Use FcFreeTypeQuery 2006-08-31 14:22:10 -04:00
Behdad Esfahbod
851dd63719 [test] Use $(srcdir) to find valgrind supressions 2006-08-31 13:18:47 -04:00
Carl Worth
2c16aa6304 perf: Don't measure meta-surface-backed surface types. 2006-08-31 08:53:58 -07:00
Carl Worth
4915e0baa7 boilerplate: Fix missing include of config.h which was preventing many backends from being tested 2006-08-31 08:36:29 -07:00
Carl Worth
d1834cca19 test: Ignore single-bit errors for SVG backend.
The interface of the various buffer/image_diff functions is improved to
provide the maximum pixel difference in addition to the number of pixels
that differ. This value can then be used to compare against a per-backend
tolerance.

Currently I've set the SVG backend's tolerance to 1 to handle some issues
we're currently seeing of single-bit differences on different systems, (but
we're not exactly sure why yet).

Also I improved the image_diff routines to properly report a status value
on failure rather than the bogus value of -1 for pixels_changed.
2006-08-31 04:01:10 -07:00
Carl Worth
d52a1f762d Move test-specific stuff out of boilerplate/ and back into test/
This now gives us two separate libtool convenience libraries,
so they have to have separate names now:
libcairoboilerplate.la and libcairotest.la.
2006-08-31 01:39:06 -07:00
Carl Worth
9547521885 boilerplate: Remove custom read/write-png code in favor of using cairo surfaces
Also combine image_diff and image_diff_flattened into a single function
2006-08-31 01:09:39 -07:00
Carl Worth
5ef4c991f6 test: Add link to test log file in HTML output 2006-08-30 15:38:15 -07:00
Carl Worth
7f4e83ceeb Split libcairotest files out from test/ and into boilerplate/
The idea here is to setup boilerplate to allow code sharing between
test/ and the upcoming perf/
2006-08-30 15:34:27 -07:00
Behdad Esfahbod
a5f068e10d [test] Add 128 to any diff component such that differences are visible 2006-08-30 13:19:05 -04:00
Behdad Esfahbod
96c8f92883 [test] bufferdiff: take abs of the pixel diffs. Oops! 2006-08-22 22:00:58 -04:00