Commit graph

1900 commits

Author SHA1 Message Date
Carl Worth
305cbd8e71 pdiff: Remove casts since we're out of the land of X++ where void* is stupidly broken 2006-12-14 07:58:01 -08:00
Carl Worth
f175b23559 pdiff: Rename everything to .c and fix an last littele C++ isms.
The only things we had missed were a few new/delete pairs, and some
obvious header file fixups, (like not doing <string>).
2006-12-14 07:58:01 -08:00
Carl Worth
18a4fa448f pdiff: Replace CompareArgs class with args_t struct
This gets rid of nearly the last vestiges of C++ from the pdiff code.
2006-12-14 07:58:01 -08:00
Carl Worth
871aba6c80 pdiff: Fix return value from perceptualdiff program 2006-12-14 07:58:01 -08:00
Carl Worth
2174ee2475 pdiff: Remove all uses of std::string 2006-12-14 07:58:01 -08:00
Carl Worth
91b156b82e pdiff: Remove RGBAImage classes now that we're just using cairo image surfaces 2006-12-14 07:58:01 -08:00
Carl Worth
4c812c38e4 pdiff: Remove hideous C++ reference passing 2006-12-14 07:58:01 -08:00
Carl Worth
2457756afd pdiff: Remove intermingled statements and declarations 2006-12-14 07:58:01 -08:00
Carl Worth
e947f5a4bd pdiff: Add .gitignore for perceptualdiff binary 2006-12-14 07:58:01 -08:00
Carl Worth
bb4d4dc771 pdiff: Remove old, unused Yee_Compare interface 2006-12-14 07:58:01 -08:00
Carl Worth
53c3a2f75b pdiff: Rewrite main program to use cairo-based pdiff_compare interface 2006-12-14 07:58:01 -08:00
Carl Worth
358645d6eb pdiff: Rip out unused ImgDiff code, (dropping -output option) 2006-12-14 07:58:00 -08:00
Carl Worth
4438fb6dca pdiff: Move function that depends on command-line argument class to same file as main 2006-12-14 07:58:00 -08:00
Carl Worth
c7379fcea4 pdiff: Rewrite Laplacian pyramid code from C++ to C 2006-12-14 07:58:00 -08:00
Carl Worth
29456d3865 pdiff: Convert C++-style comments to good old-fashioned C-style comments 2006-12-14 07:58:00 -08:00
Carl Worth
34a6af3c55 pdiff: Delete all trailing whitespace. 2006-12-14 07:58:00 -08:00
Carl Worth
d421a856d0 pdiff: Re-indent all code
I've given up on trying to preserve the old code formatting
for compatibility. We're not planning on augmenting the algorithm
itself, just integrating it into cairo. So I don't expect to
make changes that we'll be all that interested in pushing
upstream.
2006-12-14 07:58:00 -08:00
Carl Worth
4f6611ef6c pdiff: Fix line endings 2006-12-14 07:58:00 -08:00
Carl Worth
ccb3a6c4de pdiff: Compile pdiff algorithm as a libtool convenience library
The convenience library provides a pdiff_compare function with a
cairo interface into the perceptual diff algorithm.
2006-12-14 07:58:00 -08:00
Carl Worth
55f776876d test: Rework buffer_diff interface as new compare_surfaces
This is a slightly kinder interface that accepts cairo_image_surface_t
pointers rather than pointers to the raw image data and width, height,
stride. This brings us closer to hooking up the pdiff code.
2006-12-14 07:57:59 -08:00
Carl Worth
0d7870b6bf pdiff: Teach pdiff code to accept cairo image surfaces
This is a second small step in enabling cairo's test suite and the
pdiff code to start working together.
2006-12-14 07:57:59 -08:00
Carl Worth
41e01d95ed pdiff: Factor out a comparison function that doesn't read the 'args' structure
This is one small step in "libifying" pdiff which will make it
easier to share this code inside cairo's test suite.
2006-12-12 03:13:38 -08:00
Carl Worth
b50b8db6d7 test: Simplify buffer_diff by handling device offset in advance
In a manner similar to flattening in advance, we now extract the sub-
surface of interest (when testing with device offsets) before calling
into the buffer_diff functions. This allows these functions to accept
a single stride value once again instead of one for each of the three
images.
2006-12-12 02:17:19 -08:00
M Joonas Pihlaja
fd03991a6a test: random-intersections
The purpose of this test case is to help make
sure that changes to the trapezoid generation or
intersection computation in the tessellator
don't break it.
2006-12-07 04:46:07 +02:00
M Joonas Pihlaja
6301f92d2a Rework the in-fill-empty-trapezoid test to not use the cairo_test() framework.
As suggested by Behdad Esfahbod, we can not use the cairo_test() framework
when it is getting in the way.  The test itself doesn't depend on any
particular backend.

http://lists.freedesktop.org/archives/cairo/2006-December/008809.html
2006-12-07 02:31:10 +02:00
M Joonas Pihlaja
c13a1a2ed0 Replace point sampling in the fill-degenerate-sort-order with rendering.
Clean up the test to not even check the ps backend as per:

http://lists.freedesktop.org/archives/cairo/2006-December/008806.html
2006-12-07 02:31:10 +02:00
M Joonas Pihlaja
565a715d11 Change license of tessellator tests to the MIT license.
The blurb for the fill-degenerate-sort-order, fill-missed-stop and
in-fill-empty-trapezoid tests changed to this one:

http://www.opensource.org/licenses/mit-license.php

c.f. http://lists.freedesktop.org/archives/cairo/2006-December/008806.html
2006-12-07 02:31:10 +02:00
Behdad Esfahbod
16c0db0d68 [test] Break the "make clean" target into serveral rm calls
Some systems cannot handle very long list of arguments.  Carl was hitting this
for "make clean".  Break it out into several rm calls triggered by the
clean-local target.
2006-12-06 19:03:03 -05:00
Behdad Esfahbod
3cf9947795 [.gitignore] Add big-trap 2006-12-06 19:03:02 -05:00
Carl Worth
e840c120dd Fix 'make distcheck' by mentioning test/pdiff in DIST_SUBDIRS 2006-12-06 13:19:30 -08:00
M Joonas Pihlaja
48b42efcfe test: check for tessellator regression from missed stop events
The new tessellator contains a regression where stop events
that aren't followed by start events sometimes cause the
trapezoid to the left of an edge to be too high.
2006-12-06 05:58:44 +02:00
M Joonas Pihlaja
e94e0a1ca2 test: check if cairo_in_fill() is reporting false positives for empty trapezoids.
cairo_in_fill() may report true if a query point lands on an edge of an
empty trapezoid.
2006-12-06 05:58:44 +02:00
M Joonas Pihlaja
00d7b6acdd test: tessellator event comparator test case for degenerate edges.
There's currently a regression bug in the tessellation code from
switching to the new tessellator.  The bug is caused by
confusion in the comparator used to order events when there are
degenerate edges.  This test is derived from the zrusin-another
performance test case.
2006-12-06 05:58:44 +02:00
Dan Amelang
d5fcbfc29f Purge cairo-test of all calls to round()
Although round() is in the C99 standard, it isn't available in all
toolchains on which cairo is compiled (VC++, for example).
2006-12-01 12:46:55 -08:00
Carl Worth
170d35b034 pdiff: Add missing newlins at end of files. 2006-11-29 23:01:30 -08:00
Carl Worth
c863315285 Hook up Makefiles for perceptualdiff. 2006-11-29 22:55:37 -08:00
Carl Worth
6e06b68452 Remove all libtiff-related code by #ifdef 2006-11-29 22:55:31 -08:00
Carl Worth
2b92556abe Use uint32_t instead of the non-standard uint32 2006-11-29 22:55:00 -08:00
Carl Worth
812fd53499 Add perceptualdiff program totest/pdiff.
The perceptualdiff program was written by Hector Yee with contributions
from Scott Corley and Mick Weiss. It is hosted at http://pdiff.sourceforge.net
The source code added here was obtained by:

	svn co https://svn.sourceforge.net/svnroot/pdiff/trunk pdiff

which gave revision 22 of the source code.

The perceptualdiff program is available under the terms of the GNU GPL,
so I've added a note to COPYING about this program, (and the fact that
it is auxiliary only, and does not affect the license of the implementation
of cairo itself).
2006-11-29 22:40:28 -08:00
Behdad Esfahbod
72a4a98346 [test|perf|boilerplate/Makefile.am] Add -I$(top_builddir)/src to INCLUDES
needed to find cairo-features.h when building out of tree.
2006-11-27 13:23:13 -05:00
Carl Worth
02804773e7 give the big-trap test the XFAIL treatment.
We'll need to rewrite this test (and the way cairo is compiled for
testing) before it can exercise the bug of interest. In the
meantime, let's just give it an "expected failure" status.
2006-11-22 16:52:18 -08:00
Carl Worth
fdbb820ece test: Use round to pass only integers to cairo_show_glyphs (in 3 more tests)
This is the same fix as in the recent commit (166dffc96a)
but for the same idiom that appears in the operator-clear,
operator-source, and unbounded-operator tests. This fixes
the failures that were introduced by the recent switch to
_cairo_lround.
2006-11-22 16:43:45 -08:00
Carl Worth
166dffc96a test/clip-operator: Use round to pass only integers to cairo_show_glyphs
We were previously passing half-integer values here, which will
not be robust to changes in the rounding mode used for
cairo_show_glyphs. Use round() to match the rounding expected
by the reference images.
2006-11-22 16:25:53 -08:00
Vladimir Vukicevic
9cffc56228 [test] add big-trap test
This test fills a single path (a trapezoid, even) that's larger than the
16.16 precision used in pixman and other code.  It leads to memory
scribbling and a crash.  Note that there is no crash if a clip is not set.
2006-11-20 15:30:04 -08:00
Emmanuel Pacaud
10920c1326 Merge branch 'svgprint' 2006-11-18 12:59:12 +01:00
Carl Worth
eeb1fa42aa Add missing pattern-getters-ref.png to Makefile to avoid breaking distcheck target 2006-11-14 15:13:58 -08:00
Carl Worth
28a9f1dd14 Fix get-clip test for surfaces not implementing set_clip_region 2006-11-14 15:13:58 -08:00
Carl Worth
7b86cf513e Remove non-existent reference images from Makefile to avoid breaking distcheck target 2006-11-14 15:13:58 -08:00
Emmanuel Pacaud
2928f6eb5f test/pixman-rotate.c: Don't issue a show_page, it's already done in cairo-test.c 2006-11-12 20:49:34 +01:00
Emmanuel Pacaud
4f02395267 Use SVG multipage capability. 2006-11-12 20:45:50 +01:00