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.
Add notes for the new BeOS backend
Add disabled by default BeOS backend
Add BeOS files
New
New
BEOS_SURFACE_FEATURE
BeOS mutex functions
Ignore files generates by the BeOS tests
Add cairo-test-beos.*
New.
Test BeOS backend.
Add glitz backend (original patches from sunmoon1997@gmail.com), including glx, wgl, and agl support. Add CAIRO_TEST_TARGET environment variable for limiting backends to test.
Takes all *.log files and spits out html to stdout that can be used to view all test results at once.
Build pdf2png if possible.
Add support for testing the PDF backend.
New utility program to convert a PDF file into a PNG image using poppler (thanks to Kristian Høgsberg).
Ignore new stuff generated by PDF backend testing.
Add missing glue to hook up PS backend with new meta-surface support for the 5 basic drawing operations. Currently, this forces image fallbacks for all operations.
Switch from gs device of pngalpha to png16m which for some reason gives the correct result for nil-surface now, while pngalpha does not.
Key off of N_OPERATORS as the loop control for easier trimming down of this test case when debugging.
Rename stroke_style parameter to style in backend->stroke parameter list.
Remove PS-specific reference images for many tests which are now using more fallback paths than before.
Abstract log fie creation into cairo_test_init for use by tests that don't use cairo_test().
Add new test for bug #4299 as reported by Alexey Shabalin.
Note reason for expected failure.
src/cairo-scaled-font.c: Add an optional text_to_glyphs() virtual function that the backend can implement instead of ucs4_to_index().
Protect inclusion of fontconfig.h with HAVE_FCFINI.
Disable xlib tests on X servers without the Render, since they currently just crash there. A better long-term fix would be to do some useful tests in this case. Thanks to Tim Mooney.