Commit graph

1900 commits

Author SHA1 Message Date
Chris Wilson
4aae4bfa8f test: Fix typo in path-stroke-twice reference image
Sigh. I committed the reference image with the name
path-stroke-twice-ref.png.
2010-01-12 17:11:15 +00:00
Chris Wilson
a5dd5a6069 test: Add path-stroke-twice
Exercises a bug found by alois@astro.ch, whereby we inadvertently remove
a line segment when the path doubles back upon itself.

  Bug 26010 - cairo_line_to optimizes away path segments
  http://bugs.freedesktop.org/show_bug.cgi?id=26010
2010-01-12 17:07:28 +00:00
M Joonas Pihlaja
b76565d2f4 [test] Don't use uninitialised data in surface-source.c
The draw_pattern() function assumed the incoming surface
was clear, but it's not.  Explicitly clear the surface first.
2009-11-29 15:40:30 +02:00
M Joonas Pihlaja
b394240941 [test] Add missing mark_dirty() calls to test cases.
A recent optimisation has added a flag to the image
surface which is used to track whether the surface
is clear or not.  This makes it imperative that clients
call cairo_surface_mark_dirty() if they use cairo to
allocate their pixel buffers and then proceed to
initialize them without telling cairo about it.
2009-11-29 13:17:51 +02:00
Benjamin Otte
0d8a04ef47 test: Add cases to exercise clipping after no-ops
Whilst investigating:

  Bug 31788: SVG <line> with y1 == y2 and both with fractional
             part don't render
  https://bugs.webkit.org/show_bug.cgi?id=31788

I found that it can be reduced to a no-op clip following a no-op stroke
or fill. These conditions are exercised here and are shown to be a bug
introduced in the 1.9.x development series.
2009-11-25 10:53:39 +00:00
Andrea Canciani
9c24288c82 Revert "[test] Reorder dash-infinite-loop to not hit a runaway allocation."
The infinite loop problem in _cairo_stroker_dash_start is solved by
commit ee02f3484899527380df94c00f40da87f41660ea, so hitting that
problem is not possible anymore and dash-infinite stroke always
hit the memory intensive loops.
This reverts commit 29432d3d32.
2009-11-11 16:45:19 +01:00
Andrea Canciani
b1a7639465 Add dash-offset test
Stroking a dash pattern of odd length with a negative offset is broken
(except when the pattern is composed by a single dash).
2009-11-11 16:38:29 +01:00
Andrea Canciani
c181f9e9ae Add new operator-alpha-alpha test
Compositing of alpha-only sources is not throughly tested and
as a consequence the misbehaviour of some backends is not
shown by the test suite.

[ickle: Added XFAILs for pdf, ps, svg.]
2009-11-09 16:58:06 +00:00
Chris Wilson
8a10c25c3f test: Tweak Benjamin's xcomposite-projection
Include Benjamin's advice on how to make the bug more visible inline
with the code.
2009-11-05 10:02:54 +00:00
Benjamin Otte
aa1f245ea3 [test] Add "target=raster" to test
The test isn't useful on vector backends and fails there due to
antialiasing issues.
2009-11-04 13:56:15 +01:00
Benjamin Otte
84bbf179c3 [test] Add a test exposing bugs in XRenderComposite
This test fills a slightly rotated surface slightly above the 0 line.
This hits some corner cases in the XRenderComposite path.
I discovered these issues while playing with video rendering onto the
canvas in HTML5 (both Webkit and Mozilla have this problem).
I used CAIRO_ANTIALIAS_NONE and a single-color source in the test to get
rid of aliasing issues in the output images. This makes some issues
slightly less visible, but still fails for all of them. If you want to
get a clearer view, disable it and use romedalen.png instead - it has
the same size as the red surface.

(At least) 3 bugs are at work here:
- if _line_exceeds_16_16() triggers for the reference point, the
  source surface will be misaligned.
- the intel driver seems to have an off-by-one bug on my i945 when
  positioning the source surface, causing black seams at the top
  (not visible in the test unless using romedalen.png) and on the left
  of the image.
- My Xvfb fails completely in picture up/download in the xlib-fallback
  path.
2009-11-04 11:20:04 +01:00
Benjamin Otte
942a15ba9e [test] Update upscale test to expose an Xlib failure
By filling the background with grey, we can see that Xlib fills areas
with black that it shouldn't. Xlib therefore now fails this test.
2009-11-02 12:51:14 +01:00
M Joonas Pihlaja
43a775f60d [meta] Rename cairo_meta_surface_t to cairo_recording_surface_t.
The new name is more descriptive than the rather opaque meta surface.
Discussed with vigour on the mailing list and #cairo:

http://lists.cairographics.org/archives/cairo/2009-July/017571.html
2009-10-22 02:29:47 +03:00
Andrea Canciani
cef8194178 [test] Add surface-pattern-operator
Test the results of compositing ALPHA and COLOR_ALPHA surfaces
with different operators.
2009-10-20 14:57:41 +01:00
Chris Wilson
710303ef15 [test] Update rotate-image-surface-paint
Update this test case so the background is not the default border colour
so that we spot when the backend pads out the transformed image surface.
2009-10-19 17:21:57 +01:00
Chris Wilson
96117c1212 [test] Add radial-gradient-source
ranma42 found a bug in compositing with a radial gradient using the
SOURCE operator with EXTEND_NONE, as exercised here.
2009-10-17 10:37:38 +01:00
Carl Worth
ad6334b987 Add mising images to REFERENCE_IMAGES list.
Again, the kind of thing that only gets fixed at release time.
But at least we have a nice test for this.
2009-10-15 15:33:20 -07:00
Carl Worth
cdad5e1076 Mark in-fill-empty-trapezoid as an XFAIL test.
Otherwise, it was disrupting my attempts to release a snapshot, (since
it doesn't respect CAIRO_TEST_TARGET=" " and not run like most of the
tests do).
2009-10-15 14:58:39 -07:00
Carl Worth
3b113275f8 Remove stale references to non-existant reference images.
This is just one of those things that we don't get right until
someone tries running "make distcheck".
2009-10-15 14:17:30 -07:00
Benjamin Otte
ade55037ff [test] Add clip-device-offset
Exercises a bug demonstrated by WebKit with clipping + device offsets.
2009-10-15 14:08:01 +01:00
Chris Wilson
dac73d260a [build] Link against pthread-stubs
Avoid pulling in the real pthread library if the application is single
threaded and not using pthreads, by linking against pthread-stubs
instead.
2009-10-15 13:05:47 +01:00
Chris Wilson
8e4e0aa7ee [boilerplate/xcb] Check for connection errors during test 2009-09-30 17:50:35 +01:00
Benjamin Otte
6809e12161 [API] Make _cairo_meta_surface_replay() private again
Replaying a meta surface can be achieved by using it as a source for a
cairo_paint() so exporting a separate API is unnecesary and confusing.
So after consulting Chris and Carl, we decided to remove the function
again.
2009-09-30 08:58:19 +02:00
Adrian Johnson
120247ac55 Add EPS test
This test demonstrates a regression in the EPS output since 1.8.8.
The ps-eps.ref.eps was created with 1.8.8.
2009-09-24 23:29:21 +09:30
Chris Wilson
9948b5180a [test] Revamp surface-source
Include a translucent region in the source that exercises the xlib bug
that I'm trying to fix. Hmm.
2009-09-22 18:20:03 +01:00
Chris Wilson
941d3693fa [test] Exercise push-group-color.
Hunting for a known bug in the xlib backend where it invalidly converts
an argb32 source to rgb24. However, this does not appear to be that bug,
but still a useful exercise nevertheless.
2009-09-22 15:46:56 +01:00
Chris Wilson
556d064f4e [test] Typos in README from previous commit 2009-09-11 15:35:27 +01:00
Chris Wilson
43ecde2d22 [test] Add Debian packages for fonts
Mention which .deb provides the required fonts.
2009-09-11 15:15:22 +01:00
Chris Wilson
6e78409417 [test] Update big-line and remove XFAIL
Now that we use polygon clipping, output geometry should no longer exceed
the 2^16 limits imposed by pixman. For the image backend, we now use spans
for stroking and for the xlib backend we have to double check the range on
the output trapezoids. In short, cairo should pass this test.
2009-09-11 14:19:38 +01:00
Chris Wilson
f5ee785144 [test] Disable the antialias testing for the vector surfaces.
Only the raster bckends obey the font anti-alias options.
2009-09-09 13:59:50 +01:00
Chris Wilson
abaef9bfbe [test] Compare a failure against the image output
If a backend fails in exactly the same way as the image, then we can
safely assume that the failure is systematic and not an error in the
backend, so change the result to XFAIL.
2009-09-09 13:57:06 +01:00
Chris Wilson
41fbea053a [test] Typo in ft-show-glyphs-positioning
Note to self: remember to sleep more often.
2009-09-09 12:19:51 +01:00
Chris Wilson
c61480a319 [test] An oversized twin test case.
A larger variant of the twin mixed antialiasing test.
2009-09-09 11:08:17 +01:00
Chris Wilson
610b311a97 [test] Variation of twin that intermixes antialiasing
Check that we are substituting the right glyph depth and changing masks
appropriately.
2009-09-09 09:53:45 +01:00
Chris Wilson
c218ff8cbe [test] SUBPIXEL_ANTIALIAS varation of twin
Force argb32 glyphs.
2009-09-09 09:53:25 +01:00
Chris Wilson
456484514f [test] Variation of twin with ANTIALIAS_GRAY
Force generation of a8 glyphs.
2009-09-09 09:38:18 +01:00
Chris Wilson
8555984b8e [test] Add ANTIALIAS_NONE variation of twin
I'm off hunting bugs. By using twin with ANTIALIAS_NONE we can construct
a1 glyph images independently of the native font system.
2009-09-09 09:29:42 +01:00
Chris Wilson
1820cb7fd6 [test] Check for errors during ft-show-glyphs-positioning
Do not blindly assume that we managed to construct a valid scaled-font
before attempting to dereference the FT_Face. Consider a machine with
no fonts which is substituting twin...
2009-09-09 09:12:54 +01:00
Chris Wilson
9389cb78a8 [build] Improve handling of missing test apparatus
Improve detection, reporting and disabling of test backends when we lack
the required libraries and utilities.
2009-09-08 17:51:33 +01:00
M Joonas Pihlaja
29432d3d32 [test] Reorder dash-infinite-loop to not hit a runaway allocation.
This test is annoying enough as it is what with it wedging the
test suite and all.  There's no reason why it should DOS the
running box as well by sitting in a loop allocating like mad.
2009-09-05 02:25:01 +03:00
M Joonas Pihlaja
20b0e7f954 [test] Add large-source-roi.ref.png to test/Makefile.am
Oops.. forgot to add it to the build files too
2009-09-04 23:54:21 +03:00
Chris Wilson
634fdb4afd [test] Add unbounded variants of clip-{fill,stroke}
Add a couple of tests to exercise a bug that Joonas spotted that I had
introduced with the clip-reduction scheme - namely that I had
incorrectly removed the clip on unbounded operations.
2009-09-04 09:34:41 +01:00
M Joonas Pihlaja
316c1683ce [test] Fix the order of random points random-intersections-curves*.
The calls to uniform_random() to get the curve points were in
the function arguments, but argument order evaluation is compiler
implementation dependent.
2009-09-03 21:38:31 +03:00
M Joonas Pihlaja
9e45673e19 [image] Check for out of bounds image surface sizes in constructors.
The image surface code doesn't reliably work on images larger than
32767 in width or height.  This patch makes the image surface
constructors fail by returning a surface in the CAIRO_STATUS_INVALID_SIZE
state when given negative or too large dimensions so that client code
gets a prompt and correct error rather than flaky rendering on large
images.
2009-09-03 19:27:24 +03:00
M Joonas Pihlaja
12d0613210 [test] Allow tests to XFAIL by putting the cairo_t into an error state.
The test runner was extra strict about never letting a test put
the cairo_t into an error state, and never would it check for
the expectedness status of the failure.  This patch moves the
check for a test being an XFAIL above the check on the cairo_t's
final status.
2009-09-03 19:27:23 +03:00
Chris Wilson
a6dfdeec82 [test] Add clip-disjoint
Soeren found another bug (thanks Soeren!) in the clipping code - as
reproduced by this test case.
2009-09-03 00:59:21 +01:00
Chris Wilson
2c03dfa0b4 [boilerplate/test] Use numerical equality not string equality
test == != -eq
2009-09-02 10:09:50 +01:00
M Joonas Pihlaja
c87b366bfe [constructors] Guard against being called without any input files.
The make-cairo-(test|boilerplate)-constructors scripts ought
never to be called without arguments lest we are left constructorless.
2009-09-02 06:33:22 +03:00
Chris Wilson
075fc5666a [test] Add clip-image
Exercise the XCopyArea() paths under clipping - whilst modifying that code
I noticed that it was not being exercised by the test suite.
2009-09-02 00:33:22 +01:00
Adrian Johnson
20bd7d0edb Update ref images 2009-08-31 23:13:20 +09:30