When converting a grid pixel area into the range [0,255] the
GRID_AREA_TO_ALPHA() macro would truncate extra bits off the result
rather than rounding. This could cause seams between abutting
collinear edges of separately rendered polygons even when the
coordinates of the abutting edges were the same.
Reported by Soeren Sandmann on the cairo mailing list:
http://lists.cairographics.org/archives/cairo/2009-May/017043.html
By moving the backend target definition out of the massive amlagamated
block in cairo-boilerplate.c and into each of the
cairo-boilerplate-backend.c, we make it much easier to add new targets as
the information need only be entered in a single file and not scattered
across three. However, updating the target interface means trawling across
all the files -- except given that I found it difficult maintaining the
single massive array I do not see this as an increase in the maintenance
burden.
The meta-surface is a vital tool to record a trace of drawing commands
in-memory. As such it is used throughout cairo.
The value of such a surface is immediately obvious and should be
applicable for many applications. The first such case is by
cairo-test-trace which wants to record the entire graph of drawing commands
that affect a surface in the event of a failure.
Requires hooking into test-meta-surface currently. Export meta-surface!
The idea is that on detection of an error, we can reconstruct a minimal
trace from the meta-surface. The first step is to simply dump the trace
for the failing meta-surface. Later, we should automatically minimise
this further.
Enforce that each test must render within 60 seconds or be considered to
have hit an infinite loop and be reported as a CRASH. The timeout value is
adjustable via CAIRO_TEST_TIMEOUT -- a value of 0 will disable.
These need to be recorded using an XFAIL reference. In the meantime, as
the poppler output has changed, just remove all the invalid PDF reference
images.
Test case for:
Bug 22441 -- Unexpected shift with push_group and pop_group
https://bugs.freedesktop.org/show_bug.cgi?id=22441
This is a test that demonstrates the error in the pdf backend when using
groups on surfaces with non-integer sizes. In order to create such a
surface, we need to update the boilerplate to use doubles instead of
integers when specifying the surface size.
Sun's make doesn't like conditional assignments to variables
in dependencies in the form of "target: VAR+=VAL". This
construct was used to force the test suite run in the foreground
in the check-valgrind target. It is replaced by a more
explicit set of the CAIRO_TEST_MODE environment variable.
Specify another boilerplate target to use as the reference for this
target. We then use this in cairo-test-trace in preference to using the
image surface. Still not perfect, though the framework is improving.
The fill code path for the xlib and fallback surfaces use trapezoids
rather than spans, so there's lots of differences due to antialising
differences at the edge of the fill. This patch adds a ref image
for the xlib and test-fallback surfaces.
This adds a configure check for fenv.h and makes
invalid-matrix.c check for it with HAVE_FENV_H instead
of HAVE_FEDISABLEEXCEPT -- turns out Solaris doesn't
have fedisableexcept(), but it does have feclearexcept().
The same issue appears on OSX and was fixed in
ab86662ab4. This patch
adds some configure magic.
The configure test for __attribute__((constructor)) succeeds when
compiling with Sun Studio 12 on OpenSolaris but the attribute
is just ignored and has no actual effect. This causes the test
suite to not run any tests at all. With this patch we revert to
always using make-cairo-test-constructors.pl.
Using a null surface is a convenient method to measure the overhead of the
performance testing framework, so export it although as a test-surface so
that it will only be available in development builds and not pollute
distributed libraries.
As cairo-test-trace does not clear the image data before reuse, using
the default OVER operator will cause differing results for each process
when inadvertently alpha blending into the shared memory region. As we
essentially want to just copy the source pixels, be explicit and set the
SOURCE operator.
cairo-test-trace's shared memory allocation pattern is much simpler than
anticipated as it allocates a bunch of images and then frees them all,
and so only needs a simple linear allocator.