- Remove cairo_test_expect_failure. cairo-test.c now checks
env var CAIRO_XFAIL_TESTS to see if the running test is
expected to fail. The reason for expected failure is
appended to the test description.
- Test description is written out.
- Failed/crashed tests also write a line out to stderr (in red),
so one can now redirect stdout to /dev/null to only see failures.
- cairo_test() has been changed to not take the draw function
anymore, instead, draw function is now part of the test struct.
- "make check" doesn't allow limiting backends to test using env
var anymore. To limit backends to test, one should use the
TARGETS variable on the make command line.
- "make check-valgrind" now writes its log to valgrind-log instead
of valgrind.log, to not interfere with test log file processing.
- Add new target recheck, that checks only failed tests
- Add targets test and retest, and make html after (re)checking
- Make targets html and index.html lazy, only update if any tests changed
- Improve build system such that checking one test (using TESTS=...) doesn't
build all tests
- Remove pixman-rotate from XFAIL
Add a new ps reference image due to slightly different rasterization. Also
update pdf and svg backends to ignore this test since those backends do not
support ANTIALIAS_NONE.
Note in ROADMAP that bug 6759 is fixed now.
This was a gratuitous thing that was causing excessive fallbacks in
mozilla printing to PDF. The only reason it was ever there was to
get some of the tests that rely on CAIRO_ANTIALIAS_NONE to pass.
Instead we now simply don't run those tests against the PDF backend.
The list can be separated by any of space, tab, comma, colon, or semicolon.
Moreover, a CAIRO_TEST_TARGET of e.g. "glitz" matches any subtarget like
"glitz-glx".
This just provides the mechanics for storing the value and removing the old
function calls. The new value is still not used anywhere (though nor where
the old values), so there should be no functional change (other than forcing
any programs calling the old API to be updated).
This patch was produced by running git-stripspace on all *.[ch] files
within cairo. Note that this script would have also created all the changes
from the previous commits to remove trailing whitespace.
This patch was produced with the following (GNU) sed script:
sed -i -r -e 's/[ \t]+$//'
run on all *.[ch] files within cairo.
Note that the above script would have also created all the changes
from the previous commits to remove trailing whitespace.
This patch was produced with the following (GNU) sed script:
sed -i -r -e '/^[ \t]*\/?\*/ s/[ \t]+$//'
run on all *.[ch] files within cairo, (though I manually excluded
src/cairo-atsui-font.c which has a code line that appears as a comment
to this script).
This is a mega-patch that has the advantage that the entire test suite
passes both immediately before and immediately after this commit.
The disadvantage of the mega-patch is that it does not reflect the
development history of the device-offset branch, (with its various
fumblings and flailings). To capture that history, we will next merge
in that branch.
[With this change, two tests with gradients exhibit subtle differences
under device offsets. I don't think we actually care about them
though. -cworth]
In several cases the -rgb24 reference images were identical to the -ref images.
So we change the logic to find the latter if the former doesn't exist, and then
we remove the redundant images.
Add a new cairo_test_paint_checkered function so that tests that draw
with alpha can easily put an easy-to-see checkered background in place
first.
Add new tests caps-joins-alpha and paint-source-alpha that do simple
tests of strokes and image painting with source pattern alpha.
Also, add the checkered background to paint-with-alpha for
consistency.
This adds an aactual test_paginated_surface_backend rather than just
having this test surface create a paginated surface around an image
surface. This is a more realistic test of what a paginated surface is
and should be more useful as an example of how to use the paginated
surface, (and in particular the analysis portions).
Add an optimization to cairo-ps-surface.c so that it ignores any
CAIRO_OPERATOR_CLEAR drawing operation that occurs on a blank page.
Also change the test suite to erase with OPERATOR_CLEAR instead of
OPERATOR_SOURCE with an all-0 source pattern.
With this change, 32 of the 61 test cases change from all-fallback to
all-native for the ps backend.
Of these 32 test cases, 13 pass the test suite with the original
reference images. Another 18 cases differ only in the single-pixel
boundary of objects due to cairo vs. ghostscript rasterization
differences. We ignore these by adding new ps-specific reference
images, (included in this commit).
Finally, there appears to be one genuine failure, (dash-caps-joins),
in which the PostScript dashes (at least as rendered by ghostscript)
differ significantly from the cairo-rendered dashes.
This reverts 3b873c66be commit.
It seemed like a good idea at the time, but...
The pngalpha target only gets the fully transparent regions correct.
But we still need to get the partially translucent regions correct.
The pngalpha target doesn't help here---instead we were already
flattening the reference image during testing. And in that case,
having anything other than alpha==1 in the output png doesn't really
help, (and meanwhile it was tripping up the current buffer_diff code).
What was happening here is that some backends (such as the PS surface
backend) directly generate an output file, and then run a conversion
process to generate the png file. Some bugs were such that a broken
file would successfully be generated, the conversion would fail (the
failure was unnoticed), and the test suite would happily verify the
old image from a previously successful run.
This fix eliminates this source of false positives.
All test targets now list an expected cairo_surface_type_t. Add notes
on current limitations of PDF/PS/meta-surface support that causes
CAIRO_CONTENT_COLOR similar surfaces of PDF and PS surfaces to be
returned as image surfaces.
Add cairo_internal_surface_type_t for the meta, paginated, and various
test surfaces.
This also has the benefit of preserving the API that has been in place for PS/PDF surface since the (experimental) stuff in 1.0.0.
Track API change.
Continue testing PS/PDF surfaces in the CAIRO_CONTENT_COLOR mode but do it by rendering to an intermediate similar surface rather than constructing the target surface differently.
Add documentation. Add a cairo_content_t argument to PDF surface constructors.
Add documentation. Add a cairo_content_t argument to PS surface constructors.
Track changes in PS/PDF surface constructor API.
The PS/PDF backends don't allow a content to be passed in right now, so they fail against the rgb24 tests, but the trivial addition to the constructors will allow them to pass all tests with both content values.
And new constructors (currently internal only) to create an image surface with a cairo_content_t rather than a cairo_format_t.
Add a cairo_content_t argument to the constructor.
Add a cairo_content_t to the constructor and use this content value when constructing intermediate image surfaces in acquire_source, show_page, copy_page, and snapshot.
Add image flattening by compositing over white, as is done in cairo-ps-surface.c.
Track changes to cairo-paginates-surface which now requires a cairo_content_t value (no change to public PS/PDF constructors yet).
Track change in meta-surface and paginated-surface interfaces by now accepting a cairo_content_t rather than a cairo_format_t.
Ignore new output files (argb32 from pdf and ps as well as rgb24 from test-fallback, test-meta, and test-paginated).
Add new utility for flattening PNG images in order to generate the -argbf-ref.png images.
Add image_diff_flattened for comparing flattened output from PS and PDF backend with ARGB reference images by first blending the reference images over white.
Get rid of conditional, format-specific background-color initialization before running tests. Now uses ARGB(0,0,0,0) in all cases. Switch from specifying tests with a format value to specifying tests with a content value. Add support for a 'fake' COLOR_ALPHA_FLATTENED content for testing the PS and PDF output against a flattened version of the argb32 reference images (first blended over white).
Track change in cairo_ps_surface_create (now requires cairo_content_t value).
Adjust tests that draw in default (black) to first paint white so that the results are visible.
Adjust ARGB32 reference images for new white background for changed tests.
Adjust RGB24 reference images for new black background due to changed initialization (and the tests themselves being unchanged).
Try to recover a standard cairo_format_t from given pixman format masks, so that various things that only work with a standard format work correctly.
Remove cairo_glitz_surface_write_to_png, replace with generic cairo_surface_write_to_png (since it works with image-surface create_with_masks fix)
Add test_paginated_surface_t which is another test surface enabled with --enable-test-surfaces. The test_meta_surface code served as the basis for cairo_paginated_surface_t so that test surface may be entirely superfluous now.
Refine the comment describing this test surface.
Add new test surface for exercising cairo_meta_surface.
Simplify the image and test_fallback targets by not using create_for_data. Allow for NULL cleanup target functions. Add support for the test_meta_surface.
cairo_svg_surface_t owns a xml node, for support of svg_surface_composite. (_cairo_svg_surface_create_for_document): init xml_node. All surfaces except first one are stored in defs node. (emit_composite_image_pattern): returns pattern size, and don't call emit_transform if is_pattern == TRUE. (emit_composite_svg_pattern): do something. (emit_composite_pattern): returns pattern size. (_cairo_svg_surface_composite): xml_node is stored in cairo_svg_surface_t now. (emit_surface_pattern): emit surface pattern width here. Fix property names. (_cairo_svg_path_close_path): don't close path if no current point. (_cairo_svg_surface_fill_rectangles): new. (_cairo_svg_surface_fill): emit fill rule. xml_node is in surface now. (_cairo_svg_surface_composite_trapezoids): xml_node is in surface now. (_cairo_svg_surface_stroke): ditto. (_cairo_svg_surface_intersect_clip_path): ditto. Emit fill rule.
ignore svg2png.
build svg2png utility.
test SVG backend if CAIRO_HAS_SVG_SURFACE && CAIRO_CAN_TEST_SVG_SURFACE.
new.