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