The surface-pattern test was very naive, painting a surface pattern
repeated at identity size. With the new test, the surface pattern
is scaled and rotated. This reveals a serious bug in the PS backend.
We do this through a hack, that is, we make
_cairo_pattern_acquire_surface to return a surface that has four
copies of the original surface painted such that this image can
be simply repeated to get the effect of reflecting the original
surface.
This fixes the formerly XFAIL test extend-reflect.
The bug was that the bounding box of the image was computed by transforming
the vector (width,height) and then using 0,0,width,height as the bounding box.
This is obviously wrong. We use _cairo_matrix_transform_bounding_box() now.
This fixes the XFAIL test rotate-image-surface-paint.
and update reference images. This test was fixed some time ago
where I disabled type1 subsetting for vertical layouts, then
turned XFAIL again when Carl Worth didn't have the same fonts as me.
I've not updated reference images to work on FC6 and hoping that it
works for Carl too.
This is to make librsvg and poppler to use the compiled cairo instead
of whatever is on the system, such that the test suite does not depend
on a good version of cairo being installed already.
Adds some state, 'dash_starts_on', to keep track of whether a dashed path
starts with dash_on or not. This fixes the 'leaky-dash' bug (#4863) and
some other degenerate cases. The new version is, in my opinion,
considerably cleaner and more understandable than the old code.
Finally, the rewrite changes the behaviour of dashing to add degenerate
caps around corners that start at the same place as a dash begins. This
matches the behaviour seen in acroread.
This rewrite is based on an initial rewrite done by Jeff Smith.
With 50 iterations I'm seeing the following assertion failure:
cairo-hash.c:477: _cairo_hash_table_insert: Assertion `NOT_REACHED' failed.
Thanks to Jan Slupski <jslupski@juljas.net> for pointing out this bug.
This test exercises a clone_similar extents bug noticed by
Benjamin Otte. As expected, the xlib backend fails due to
that bug, (and interestingly, the ps backend is showing a
failure as well).
This new test case demonstrates a bug in the PDF backend, (source
surface patterns are repeated even with a pattern extend of NONE).
Thanks to Romuald <mydevel@free.fr> and Claudio Saavedra
<csaavedra@alumnos.utalca.cl> for pointing out the bug.
Make these functions consistent with other cairo_get functions
by making cairo_get_dash_count return the count directly, and
removing the cairo_status_t return value from cairo_get_dash.
Adds a test for missing and out-of-range glyph indexes. The expected
ATSUI renderings are added as references, please replace these with
FT renderings when they become available.
The test passes an empty string to cairo_show_text, cairo_text_path, and
cairo_text_extents, and NULL and an invalid pointer, with zero num_glyphs to
cairo_show_glyphs, cairo_glyph_path, and cairo_glyph_extents.
This custom stroking code allows backends to use optimized region-based
drawing operations for rectilinear strokes. This results in a 5-25x
performance improvement when drawing rectilinear shapes:
image-rgb box-outline-stroke-100 0.18 -> 0.01: 25.58x speedup
████████████████████████▋
image-rgba box-outline-stroke-100 0.18 -> 0.01: 25.57x speedup
████████████████████████▋
xlib-rgb box-outline-stroke-100 0.49 -> 0.06: 8.67x speedup
███████▋
xlib-rgba box-outline-stroke-100 0.22 -> 0.04: 5.39x speedup
████▍
In other words, using cairo_stroke instead of cairo_fill to draw the
same shape was 5-15x slower before, but is 1.2-2x faster now.
I must not have the right font available, (test result is coming out
looking like the result of ft-text-vertical-layout-type3, Vera?).
We should switch this test to load a bundled font, (should do that for
all font-using tests, too).
This test used to be named -truetype, which reflected the type of font used in
the test, in contrast to the -type1 test that uses a Type1 font. However, we
renamed this test to -type3 to emphasize the fact that a TrueType subset is
not emitted for vertical fonts and a Type3 fallback font is generated.
Now things have changed: we try generating a Type1 fallback font which is what
is happening for this test. Moreover, the -typ1 test also is generating a
Type1 fallback font since the Type1 subset font is not useful for vertical
fonts.
This fixes the last problem with vertical fonts in PS/PDF. As such, remove
ft-text-vertical-layout-type1 test from XFAIL and add PS-specific ref image
to pass.
The float version of many math functions were introduced in C99, and were
causing compile failure on systems like OS X. We now define them to their
double variant if __USE_ISOC99 is not defined. We may want to expand it later
to cover non-gcc compilers too, but since this is pdiff only, it's not really
important.
The PS output for ft-text-vertical-layout-type3 looks correct, except for some
antialiasing mismatch. Ading ref image to fix this, and so, remove the test
from XFAIL.
We update the test suite reference images where needed, (pdiff
avoided a few, but most still needed updating). We take advantage
of the need for new reference images to shrink some of the giant
tests to speed them up a bit.
This optimization provides a 2x improvement in linear gradient
generation performance (numbers from an x86 laptop):
image-rgb paint_linear_rgba_source-512 26.13 -> 11.13: 2.35x speedup
█▍
image-rgb paint_linear_rgba_source-256 6.47 -> 2.76: 2.34x speedup
█▍
image-rgba paint_linear_rgb_over-256 6.51 -> 2.86: 2.28x speedup
█▎
image-rgb paint_linear_rgba_over-512 28.62 -> 13.70: 2.09x speedup
█▏
image-rgba fill_linear_rgb_over-256 3.24 -> 1.94: 1.66x speedup
▋
image-rgb stroke_linear_rgba_over-256 5.68 -> 4.10: 1.39x speedup
▍