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.
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.