Where a content specific reference image exists, prefer to have both
content reference images (i.e. both argb32.ref and rgb24.ref) rather
than a mix of .ref and argb32/rgb24.
Courtesy of the improved check-ref-dups written by Bryce Harrington:
Running make check on the codebase (with default configuration) with the
redundant images removed produces essentially the same test results:
Before
------
Tests run: 13687
Passed: 9216
Failed: 3566
Expected Failed: 312
Error: 1
Crashed: 17
Untested: 575
Total: 13687
After
-----
Tests run: 13689
Passed: 9216
Failed: 3566
Expected Failed: 312
Error: 1
Crashed: 19
Untested: 575
Total: 13689
(with the exception being the pthread tests misbehaving between runs)
These tests use reference images somewhat differently from other tests,
so treat them as special cases and avoid recommending deleting any of
their files.
Add TODO's to each test to rework them to be more consistent with other
tests.
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
perceptualdiff.c:55:19: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
perceptualdiff.c:60:16: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
The current sha1sum-based file checker does a blanket comparison of all
files with each other, which is fast but not directly helpful since it
doesn't distinguish between sibling files (which are allowable to be
duplicates). Also, it ignores files that may have byte differences
(such as PNG header differences) but are otherwise pixel-identical.
This patch replaces the sha1sum-based checker with one that accounts for
the default fallback path and uses perceptualdiff to compare files that
are bytewise different and verify whether they actually are different.
The intention is that the output of this command can be directly used to
remove redundant files, e.g.:
cd test
make check-ref-dups | cut -d' ' -f2 | \
while read f; do git rm "reference/$f"; done
This should have no impact on make check's results (modulo any tests
that behave erratically), and will help trim down the size of the
tarball.
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
[ickle: rebase and add the suggested command to the Makefile]
cmp runs faster than perceptualdiff, and catches files that are exact
copies of the reference image. We still use perceptualdiff for catching
files that aren't bytewise identical, but are still identical at the
pixel level.
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
This script requires the perceptualdiff program, which can be built as
follows:
cd test/pdiff && make perceptualdiff
The script's output provides a list of target-specific or
format-specific images that are identical to their more generic
reference files, and thus are redundant and can be safely removed from
the archive without altering any test behaviors.
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
[ickle: applied Behdad's suggestion of renaming the script check-refs.sh]
The check-ref-dups target in Makefile.am was not updated with the new
path when the reference images were moved from test/ to
test/reference/. Now it produces output properly again.
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
When we refine geometry, we do so to a tolerance as specified by the
user. This means that we can not expect tessellated results to have
exact results, but always they should match within the specified
tolerance.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Triggers the following warning during build:
sample.c:61:1: warning: ‘horizontal’ defined but not used
[-Wunused-function]
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Ever since the test output was moved from test/ to test/output/, using
CAIRO_REF_DIR to make the test suite succeed no longer works. The test suite was
looking for the wrong file names.
This patch makes this work again. However, I am not sure that this really is the
correct fix. It just seems to work. :-)
Reported-by: Darxus <darxus@chaosreigns.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
A side effect of
commit c986a7310b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Thu Jan 24 08:55:54 2013 +0000
image: Enable inplace compositing with opacities for general routines
is that we should in theory be reducing the rounding errors when
compositing coverage.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
After acquiring a GL device and the same GL context, surface, and
display combination is already active outside of Cairo, do not ask EGL
or GLX to change the current context as that may cause a flush on some
drivers. Also do not unset the context when releasing the device for the
same reason.
This creates an image surface with a non-natural stride and paints it to a
similar surface.
In the xcb backend, this causes a call to _cairo_xcb_connection_put_subimage()
which tries to send a huge PutImage request. As a result, xcb kills the X11
connection.
Signed-off-by: Uli Schlachter <psychon@znc.in>
In order to prevent underflow when searching for the closing pen vertex,
we first need to be sure that it does not simply lie next to the opening
pen vertex. As a result we were missing many cases that should have been
a bevel (in == out) and generating almost complete round caps instead.
Reported-by: Dominik Röttsches <dominik.rottsches@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56432
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
According to musl libc author:
"C99 requires the FE_ macros to be defined if and only if the exception they
correspond to is supported"
So we define these macros to 0 if they are not supported. Support for these FPU
exceptions is not necessary for correct functionality, but makes some tests less
effective.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55771
Signed-off-by: Uli Schlachter <psychon@znc.in>
Rather than using the traps reference for all target as this then
generates false negatives with the spans compositor.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
From https://bugs.freedesktop.org/show_bug.cgi?id=53841:
"Rectangle drawn incorrectly when it has zero height
and miter limit greater than 1.414"
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Carl Worth demonstrated a glaring bug in the new stroking code,
introduced in commit 545f30856a (stroke: Convert the outlines
into contour and then into a polygon), whereby only a bevel join was
being used to connect segments around a sharp inflection point.
This adds the two examples he reported to the test suite.
An overzealous update after converting antialiasing missed the object of
this test was exactly to point out an error due to the antialiasing. So
restore it back to the prestine reference and mark the image backend as
failing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Whilst generating a glyph run from a string, any glyphs that are far
outside the surface (including a substantial guard region) are culled.
This affects the path extents. Workaround this by increasing the surface
size.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Apparently this too suffered from bug-bo-collins and is fixed by
(bo-rectangular: Emit subsummed boxes for overlapping edges).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
==12598== 1,344 (768 direct, 576 indirect) bytes in 2 blocks are
definitely lost in loss record 512 of 519
==12598== at 0x402894D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==12598== by 0x4C76501: _cairo_image_surface_create_for_pixman_image (cairo-image-surface.c:176)
==12598== by 0x4C76953: _cairo_image_surface_create_with_pixman_format (cairo-image-surface.c:345)
==12598== by 0x44CFAC: draw (xcb-snapshot-assert.c:36)
==12598== by 0x40E14C: cairo_test_for_target (cairo-test.c:923)
==12598== by 0x40EEA7: _cairo_test_context_run_for_target (cairo-test.c:1545)
==12598== by 0x40BD53: main (cairo-test-runner.c:254)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If the join indicates the pair of edges are parallel, we may be
considering the final segment of the spline with a different tangent
vector than the slope of the final edge and so lead to false dropping of
an edge. This has the effect that the line segments between 'arc arc arc
arc' (a rounded rectangle) are no longer horizontal or vertical. As path
construction tries to eliminate joins between colinear segments, this
optimisation should not be required anyway.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As we convert the unaligned clip boxes to a region, we need to process
the intersection of the boxes with the clip surface as a separate step.
Fixes tighten-box for the base compositor.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Uli Schlachter spotted that I had inadvertently committed (606e9e1c9) a
broken set of test images for the tighten-bounds case and so masked a
nasty bug with the mishandling of unaligned clips.
Reported-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>