Commit graph

26 commits

Author SHA1 Message Date
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
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
Chris Wilson
ac6c6fe1d3 [test] Add rotated clip.
Exercise a bug found in not offsetting the clip mask when combining with
the composite mask.
2009-08-29 17:10:05 +01:00
Chris Wilson
52e5ce3a36 [test] Add clip-stroke
Soeren was the first to report a clipping regression in the xlib backend
with strokes, and provided a test case to exercise the bug. This is an
extension of his test to provide coverage of different clipping and
stroking methods.
2009-08-29 17:07:39 +01:00
Chris Wilson
92f6f275fc [test] Implicit close
This is a simple test that broke with the determination of rectilinearity
during path construction. I forgot the implicit close on fill and so the
ignored the final diagonal edge and failed to draw the triangle.
2009-08-29 17:07:38 +01:00
Chris Wilson
ff0ca6d02a [test] Stress the intersection handling by feeding spans/traps random curves
Another stress test for the fill/stroke and intersection finders.
2009-08-29 08:08:31 +01:00
Chris Wilson
f8bb3617c3 Eliminate self-intersecting strokes.
We refactor the surface fallbacks to convert full strokes and fills to the
intermediate polygon representation (as opposed to before where we
returned the trapezoidal representation). This allow greater flexibility
to choose how then to rasterize the polygon. Where possible we use the
local spans rasteriser for its increased performance, but still have the
option to use the tessellator instead (for example, with the current
Render protocol which does not yet have a polygon image).

In order to accommodate this, the spans interface is tweaked to accept
whole polygons instead of a path and the tessellator is tweaked for speed.

Performance Impact
==================

...
Still measuring, expecting some severe regressions.
...
2009-08-29 08:08:28 +01:00
Chris Wilson
067de9cf62 [test] Add clip-fill.
Test filling through a complex clip.
2009-07-31 17:52:29 +01:00
Chris Wilson
7db1fb6fa9 [test] Add clip-text
Test applying a complex clip to text.
2009-07-31 17:32:09 +01:00
Chris Wilson
81d3e15e6c [test] Yet another bug in curve-to as line-to.
Andrea Canciani (ranma42) found another instance of my broken 'degenerate'
curve-to as line-to optimisation. All I can say is when I do something
wrong, at least I'm consistent!

This test case highlights the bug in the rel-curve-to path.
2009-07-29 16:17:11 +01:00
M Joonas Pihlaja
dacc380dd9 [test] Test extremely small dash lengths.
The stroker code is liable to wedge when passed
dash patterns which don't advance the dash offset
due to limited precision arithmetic.  This test
attempts to hit all the places in the stroker where
that can happen.

Reported on the cairo mailing list by Hans Breuer:

http://lists.cairographics.org/archives/cairo/2009-June/017506.html
2009-07-28 08:41:49 +01:00
Chris Wilson
660c389d11 [test] Add degenerate-curve-to
Andrea Canciani (ranma42) pointed out a second bug in the curve-to as
line-to optimisation, that is a curve starting and finishing on the same
point is not necessarily degenerate. This test case exercises 5 different
curves that start and end on the same point.
2009-07-28 08:37:03 +01:00
Carl Worth
01acad1659 Merge branch 'master' of git.cairographics.org:/git/cairo 2009-07-27 15:26:19 -07:00
Carl Worth
3cc9a6050d Add new test: curve-to-as-line-to
This test anticipates a future optimization, (already pushed
upstream but not pulled yet), with a buggy implementation
of replacing curve_to with line_to.
2009-07-27 15:24:55 -07:00
Chris Wilson
6ca3720ba6 [test] Overlapping glyphs
Add a test case to explicitly check handling of overlapping glyphs.
2009-07-27 10:19:03 +01:00
Chris Wilson
bed2701e1c Remove clip handling from generic surface layer.
Handling clip as part of the surface state, as opposed to being part of
the operation state, is cumbersome and a hindrance to providing true proxy
surface support. For example, the clip must be copied from the surface
onto the fallback image, but this was forgotten causing undue hassle in
each backend. Another example is the contortion the meta surface
endures to ensure the clip is correctly recorded. By contrast passing the
clip along with the operation is quite simple and enables us to write
generic handlers for providing surface wrappers. (And in the future, we
should be able to write more esoteric wrappers, e.g. automatic 2x FSAA,
trivially.)

In brief, instead of the surface automatically applying the clip before
calling the backend, the backend can call into a generic helper to apply
clipping. For raster surfaces, clip regions are handled automatically as
part of the composite interface. For vector surfaces, a clip helper is
introduced to replay and callback into an intersect_clip_path() function
as necessary.

Whilst this is not primarily a performance related change (the change
should just move the computation of the clip from the moment it is applied
by the user to the moment it is required by the backend), it is important
to track any potential regression:

ppc:
Speedups
========
image-rgba         evolution-20090607-0    1026085.22 0.18% -> 672972.07 0.77%:  1.52x speedup
▌
image-rgba         evolution-20090618-0    680579.98 0.12% -> 573237.66  0.16%:  1.19x speedup
▎
image-rgba      swfdec-fill-rate-4xaa-0    460296.92 0.36% -> 407464.63  0.42%:  1.13x speedup
▏
image-rgba      swfdec-fill-rate-2xaa-0    128431.95 0.47% -> 115051.86  0.42%:  1.12x speedup
▏
Slowdowns
=========
image-rgba     firefox-periodic-table-0    56837.61 0.78% -> 66055.17    3.20%:  1.09x slowdown
▏
2009-07-23 15:32:14 +01:00
Chris Wilson
922b01ad14 [test] Add a simplified CLEAR test.
Just performs a very basic masked clear. This does not exhibit the bug I was
looking for, but is still useful for its simplicity.
2009-07-17 14:27:19 +01:00
Benjamin Otte
0fd944d4bf Use new pixman extended blend operators
It also adds extended-blend tests.

Based on a previous patch by Emmanuel Pacaud <emmanuel.pacaud@free.fr>
2009-07-14 16:03:43 +02:00
Chris Wilson
86624627e4 [test] Add group-unaligned
Test case for:
   Bug 22441 -- Unexpected shift with push_group and pop_group
   https://bugs.freedesktop.org/show_bug.cgi?id=22441

This is a test that demonstrates the error in the pdf backend when using
groups on surfaces with non-integer sizes. In order to create such a
surface, we need to update the boilerplate to use doubles instead of
integers when specifying the surface size.
2009-06-27 17:53:18 +01:00
Chris Wilson
851c883962 [test] Add group-clip
Larry Ewing found an ancient and nasty bug whereby a path was not
corrected whilst pushing and popping groups.
2009-06-19 19:08:29 +01:00
Nis Martensen
3c5e57e694 [test] Verify current point position after subpath closure
Make sure cairo_close_path always takes the current point where it
should be.
2009-06-17 16:39:00 +01:00
Chris Wilson
ac56371550 [test] Exercise overlapping glyphs
Quite an expensive test that converts an image into a distorted array of
glyphs, using a perspective transformation taking the intensity of the
pixel as depth. This generates a pretty picture and many overlapping
glyphs.
2009-06-09 00:06:08 +01:00
Chris Wilson
c488b33644 [test] Create a new fallback surface to exercise 16-bit paths.
Add a variation of test-fallback-surface that forces the use of a 16-bit
pixman format code instead of the standard 32-bit types. This creates an
image surface akin to the fallbacks used with low bit-depth xservers.
2009-05-05 21:17:11 +01:00
Chris Wilson
a8158d443e [truetype] Move the sizeof asserts to compile time.
Eliminate the need for a runtime test on the sizeof the private structures
by performing the check at compile time. This was provoked by Ginn Chenn
noting that the test was including a private header.
2009-03-03 11:21:35 +00:00
Chris Wilson
b30de64a8c [test] Add regression test for 005436
Jeff Muizelaar found a regression in commit 005436 and submitted this
little test to exercise it. The essence of the bug appears to be wrt to
the product of the CTM and device transform matrices.
2009-03-01 10:10:13 +00:00
Jeff Muizelaar
f7b3c9df58 Add test/Makefile.sources
This lets test/Makefile.am and test/Makefile.win32 share a common list of sources.
It also makes test/Makefile.win32 useful again.
2009-02-16 22:28:32 -05:00