Previously we were setting the target tolerance based on the surface
type. But that doesn't work as multiple backends will provide a surface
of type meta. So instead we put the tolerance as a value in the
cairo_test_target data structure.
With this change, some single-pixel errors of 1 in the SVG backend
should now be ignored.
Manually "cherry picked" from bcb7863f00
(the regular cherry-pick command cannot handle the file renames and
indentation changes involved here).
The interface of the various buffer/image_diff functions is improved to
provide the maximum pixel difference in addition to the number of pixels
that differ. This value can then be used to compare against a per-backend
tolerance.
Currently I've set the SVG backend's tolerance to 1 to handle some issues
we're currently seeing of single-bit differences on different systems, (but
we're not exactly sure why yet).
Also I improved the image_diff routines to properly report a status value
on failure rather than the bogus value of -1 for pixels_changed.
Cherry-picked from d1834cca19
(and fixed ever so slightly to actually compile).
Also combine image_diff and image_diff_flattened into a single function
This was manually taken from 9547521885
(It would have been a cherry-pick, but that doesn't yet handle file
renames.)
Adrian's recent commits broke PLT hiding by calling cairo_version_string
from inside cairo. Add slim_hidden_def and slim_hidden_proto for it.
(cherry picked from 445251cc79 commit)
The previous change was in b62710d4f8
We just forgot to update the reference images at the time so there
have been false failure results in the test suite until now.
(cherry picked from 670b3ce243 commit)
The trick for this was to carefully ensure that the pen always has
at least 4 vertices. There was a previous attempt at this in the
code already but the test case had a combination of matrix and radius
that resulted in a value that was just able to sneak past the previous
check.
(cherry picked from 10cd23d51f commit)
The modification was performed with care to ensure that the bug
is still exercised. Also, reference images are added.
(cherry picked from 5b7a7f39ad commit)
Type1 subsetting adds the .notdef glyph to the subset because the Type 1
spec requires that it be defined. However if the subset already has
256 glyphs, this will cause the Encoding vector to have 257 entries
which ghostscript does not like.
(cherry picked from 753763ff25 commit)
In particular, many possible error values on a surface provided
to cairo_pattern_create_for_surface were previously being swallowed
and a nil pattern was returned that erroneously reported
CAIRO_STATUS_NO_MEMORY.
(cherry picked from 01502471e3 commit)
This adds a new nil cairo_image_surface to hold CAIRO_STATUS_INVALID_FORMAT.
Previously the detected error was being lost and a nil surface was
returned that erroneously reported CAIRO_STATUS_NO_MEMORY.
(cherry picked from 4d2b54a271 commit)
One of these functions was already documented to be doing this, and
the other one should have been. Now the documentation and behavior
for both are consistent, (and the path-data test case verifies this).
(cherry picked from 5f833c134b commit)
This was thanks to a report from crucible (run #2113) since it tested
with older versions of gcc (3.3.6) than most of the cairo developers
use, (so we had been getting the _FbOnes macro not the function).
(cherry picked from 82b710ebc2 commit)