Commit graph

1900 commits

Author SHA1 Message Date
Behdad Esfahbod
c87edd9e10 [test] Update surface-pattern test to include transformations
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.
2007-02-23 17:26:42 -05:00
Behdad Esfahbod
3405fb870e [test] Increase size of extend-reflect test to see that pattern repeats 2007-02-23 17:26:42 -05:00
Behdad Esfahbod
5562050bcf Support CAIRO_EXTEND_REFLECT on surface patterns
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.
2007-02-23 17:26:42 -05:00
Behdad Esfahbod
a57bc6b697 [test] Add ref image for extend-reflect 2007-02-23 17:26:41 -05:00
Behdad Esfahbod
7d91c8a2cb [test] Fix syntax typo in text-rotate 2007-02-21 15:47:43 -05:00
Behdad Esfahbod
155a1b48f6 [test] Remove text-rotate test from XFAIL as the bugs are fixed now
All missing is subpixel text positioning, but we don't need an XFAIL test
to remind us for that.
2007-02-21 13:52:17 -05:00
Behdad Esfahbod
b54174e917 [PS] Fix rotated image pattern emission by correcting setting the bbox
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.
2007-02-21 13:43:08 -05:00
Behdad Esfahbod
6ae4a4fd71 [test] Remove ft-text-vertical-layout-type1 from XFAIL
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.
2007-02-21 12:57:09 -05:00
Behdad Esfahbod
c6a067f967 [test] Add test case for bug #7965 to the get-path-extents test 2007-02-21 11:50:24 -05:00
Vladimir Vukicevic
28c1e46b8e [quartz] rename test override images from nquartz to quartz 2007-02-20 13:22:11 -08:00
Vladimir Vukicevic
4c201723ce [quartz] Rename nquartz to quartz 2007-02-20 12:15:35 -08:00
Behdad Esfahbod
2335a23a16 [test/Makefile.am] Document why svg2png and pdf2png use LDADD
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.
2007-02-20 01:01:39 -05:00
Jeff Muizelaar
afd5f92195 Fix several issues with dashed stroking code, particularly 'leaky-dash'
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.
2007-02-19 16:06:57 -05:00
Jeff Muizelaar
74ded42327 Add a new dashing test
This new dashing test, based on some code from Jeff Smith, does a pretty
good job exploring all the cases that the dashing code needs to deal with.
2007-02-19 16:06:56 -05:00
Jeff Muizelaar
1c1697398c Add two new test cases to degenerate-path test
These new cases deal with degenerate paths at the end of dashed paths. They
currently fail.
2007-02-19 16:06:56 -05:00
Carl Worth
51ca187d3e Mark test/rotate-image-surface-paint as XFAIL
This test has always failed with the ps backend since the test
was initially written.
2007-02-13 23:55:03 -08:00
Carl Worth
d6d1767f9a Increase pthread-show-text thread count and add cairo_select_font_face to expose more bugs. 2007-02-13 10:47:06 -08:00
Carl Worth
fc3ce1e80a test/pthread-show-text: Increease iterations to expose locking bug
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.
2007-02-06 20:41:58 -08:00
T Rowley
0b7ba5ccfa Add linear-gradient-reflect test case
This testcase works before the
e9bef30d2b landing, and has visual
artifacts afterwards.
2007-02-02 16:37:27 -08:00
Carl Worth
26ef4746e6 Add two tests of cairo_surface_finish to test/nil-surface.c
This tests calling cairo_surface_finish with either NULL or
with a nil surface, (either currently causes a crash).
2007-02-01 15:21:12 -08:00
Carl Worth
ebc1cd91f8 Add rotate-image-surface-paint test case
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).
2007-01-26 11:43:27 -08:00
Carl Worth
d6bb0d7720 .gitignore: Add text-glyph-range 2007-01-20 01:47:06 -08:00
Carl Worth
d91d5d12f3 Add new scale-down-source-surface-paint test
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.
2007-01-19 16:47:31 -08:00
Vladimir Vukicevic
d08502d939 Merge branch 'master' of git+ssh://git.cairographics.org/git/cairo 2007-01-18 16:50:41 -08:00
Vladimir Vukicevic
eefcfbf5a1 [nquartz] add test reference files for nquartz backend 2007-01-18 16:49:42 -08:00
Carl Worth
28d6a228f0 Fix cairo_get_dash and cairo_get_dash_count APIs
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.
2007-01-18 13:09:23 -08:00
Robert O'Callahan
4e1c2b1ad8 Rename cairo_copy_clip_rectangles to cairo_copy_clip_rectangle_list 2007-01-17 15:07:31 -08:00
Brian Ewins
9e332eadad [test] Test handling of out-of-range glyph indexes. (#9530)
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.
2007-01-16 01:25:53 +00:00
Behdad Esfahbod
ab29396ef9 [test] Add new test text-zero-len (#5177)
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.
2006-12-28 20:00:16 -05:00
Brian Ewins
8368fa2fcf [test/text-rotate] Use the same text for measuring and printing 2006-12-23 15:44:16 -05:00
Carl Worth
c08bd4ec37 Ignore another test case binary 2006-12-23 00:03:31 -08:00
Carl Worth
ba531642f7 Add optimization for rectilinear stroke
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.
2006-12-22 17:59:20 -08:00
Carl Worth
b118911853 Put ft-text-vertical-layout-type1 back on the XFAIL list
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).
2006-12-22 17:59:20 -08:00
Carl Worth
9d2d3b95e3 Add new rectilinear-stroke test
This is in preparation for an optimized implementation of cairo_stroke
for rectilinear paths.
2006-12-22 17:59:20 -08:00
Behdad Esfahbod
344901a1a1 [test] Fix typo in test comment, again 2006-12-20 18:15:22 -05:00
Carl Worth
267afe7be3 test/.gitignore: Ignore binarries for some recently added tests 2006-12-18 16:05:42 -08:00
Behdad Esfahbod
c6ec6ed696 [tests/ft-text-vertical-layout-type3] Remove comment that this emits Type3 font
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.
2006-12-17 18:42:05 -05:00
Behdad Esfahbod
50efd71935 [type1-subset] Return UNSUPPORTED 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.
2006-12-17 18:37:01 -05:00
Behdad Esfahbod
0bea2ce7f7 [pdiff] Define _GNU_SOURCE to get correct symbols out of <math.h>
math.h does not define __USE_ISOC99 otherwise.
2006-12-17 14:32:08 -05:00
Behdad Esfahbod
2ca6a767ee [pdiff] Don't use float math functions if not using gcc with C99
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.
2006-12-17 14:24:57 -05:00
Behdad Esfahbod
294d1a3c4e [test] Add ft-text-vertical-layout-type3-ps-argb32-ref.png
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.
2006-12-17 01:07:41 -05:00
Behdad Esfahbod
cab3f84ad3 [test] Fix typo in test comment 2006-12-16 18:48:59 -05:00
Behdad Esfahbod
57589a9049 [pdiff] Use CAIRO_CFLAGS, to make sure warnings are enabled 2006-12-16 18:18:47 -05:00
Behdad Esfahbod
8f2ad0affd [pdiff] Fix compiler warnings, that were causing crashes 2006-12-16 18:16:46 -05:00
Carl Worth
8b31038b9f Fix a couple of more stale images holding up 'make distcheck' 2006-12-14 10:16:34 -08:00
David Turner
e9bef30d2b Optimize gradient computations
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
▍
2006-12-14 09:27:45 -08:00
Carl Worth
af9cce6aa2 Fix 'make distcheck' after recent file removals 2006-12-14 09:18:26 -08:00
Carl Worth
4888a02666 test: Remove ps-specific reference images no longer needed thanks to pdiff 2006-12-14 07:58:02 -08:00
Carl Worth
5e0818d79d test: Remove svg-specific reference images no longer needed thanks to pdiff
This doesn't get rid of all the SVG reference images, but it
does clean up quite a few.
2006-12-14 07:58:02 -08:00
Carl Worth
c426e71141 Hook up pdiff to the test suite now that its written in C 2006-12-14 07:58:02 -08:00