Commit graph

544 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
3e7e0eacef Update reference images
Refresh the test reference images to match the current output where
acceptable.
2009-08-29 17:07:41 +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
83c2f44dd9 [test] Update REFERENCE_IMAGES 2009-08-29 17:07:35 +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
51bd27afa1 [boilerplate/test] Convert make-*-constructors to shell
Remove the intermediate C program that was a nuisance whilst
cross-compiling and replace it with a simple shell script that is just a
combination of cat + sed.
2009-08-06 10:11:32 +01:00
Chris Wilson
1d2abe7d10 [gl] Refresh clip-operator ref.
A minor renderering difference, acceptable.
2009-07-31 19:38:23 +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
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
bff0b11634 [gl] Update reference images 2009-07-22 07:45:21 +01:00
Pierre Tardy
0c1e86d661 Cross-compilation fix for boilerplate/test 2009-07-20 18:56:09 +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
Chris Wilson
1caa341039 Fix build under distcheck
Need to play a little dance to get the sources included and paths correct
whilst building source files with objdir != srcdir under distcheck.
2009-07-15 13:26:34 +01:00
Chris Wilson
5796a9240e [test] Reconstruct REFERENCE_IMAGES
Rebuild the list from scratch using the contents of my git working tree.
2009-07-14 19:11:56 +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
a81cf14bd6 [test] Sanitise REFERENCE_IMAGES
Add and delete files to satisfy 'make check-ref-missing'.
2009-07-13 10:58:44 +01:00
Chris Wilson
7f3eda4e9f [test] Update reference images for gs 8.64 2009-07-13 10:46:54 +01:00
Chris Wilson
fe73a9dd14 [test] Record trace to an in-memory meta-surface
Requires hooking into test-meta-surface currently. Export meta-surface!

The idea is that on detection of an error, we can reconstruct a minimal
trace from the meta-surface. The first step is to simply dump the trace
for the failing meta-surface. Later, we should automatically minimise
this further.
2009-07-03 12:34:10 +01:00
Carlos Garcia Campos
5becfc2bd5 [test] Add pdf reference image for rotate-image-surface-paint
Remove also argb32 and rgb24 pdf reference images.
2009-07-02 14:56:58 +02:00
Carlos Garcia Campos
f81203cde8 [test] Add pdf reference image for mask-transformed-image 2009-07-02 14:56:48 +02:00
Carlos Garcia Campos
97def877bb [test] Update pdf reference image for surface-pattern
Remove also argb32 and rgb24 pdf reference images.
2009-07-02 14:56:30 +02:00
Carlos Garcia Campos
9bc7ab980d [test] Update pdf reference image for filter-nearest-transformed
Remove also argb32 and rgb24 pdf reference images.
2009-07-02 14:50:16 +02:00
Carlos Garcia Campos
27938f7e3f [test] Update pdf reference image for filter-nearest-offset
Remove also argb32 and rgb24 pdf reference images.
2009-07-02 14:50:16 +02:00
Carlos Garcia Campos
13d9374ec1 [test] Remove PDF reference images for scale-source-surface-paint
It works with current poppler now
2009-07-02 14:50:16 +02:00
Carlos Garcia Campos
3710c4184c [test] Remove PDF reference images for paint-with-alpha
It works with current poppler now
2009-07-02 14:50:15 +02:00
Carlos Garcia Campos
8162acd81a [test] Remove PDF reference images for paint-source-alpha
It works with current poppler now
2009-07-02 14:50:15 +02:00
Chris Wilson
ddadd41a6c [test] Remove broken PDF reference images for push-group
More XFAIL reference images that are now invalidated by changes in
poppler.
2009-06-27 18:07:36 +01:00
Chris Wilson
4d233fa4a6 [test] Remove invalid smask PDF reference images
These need to be recorded using an XFAIL reference. In the meantime, as
the poppler output has changed, just remove all the invalid PDF reference
images.
2009-06-27 18:04:37 +01: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
M Joonas Pihlaja
c7cf5317f5 [test] Fix Makefile.am for Solaris make.
Sun's make doesn't like conditional assignments to variables
in dependencies in the form of "target: VAR+=VAL".  This
construct was used to force the test suite run in the foreground
in the check-valgrind target.  It is replaced by a more
explicit set of the CAIRO_TEST_MODE environment variable.
2009-06-24 23:33:44 +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
Chris Wilson
0a34abace7 [test] Experiment with reference targets
Specify another boilerplate target to use as the reference for this
target. We then use this in cairo-test-trace in preference to using the
image surface. Still not perfect, though the framework is improving.
2009-06-19 19:06:17 +01:00
M Joonas Pihlaja
8e7f667abb [test] Mark scale-offset tests as XFAIL for image, xlib-fallback.
The scale-offset tests trigger a loss-of-precision bug when
converting double matrices from cairo to pixman format.

http://lists.cairographics.org/archives/cairo/2008-November/015671.html
2009-06-19 02:45:38 +03:00
M Joonas Pihlaja
9ecee571c1 [test/build] Don't test Freetype font stuff without Fontconfig.
Most Freetype hitting tests require Fontconfig to find
them some fonts.
2009-06-18 16:09:31 +01:00
M Joonas Pihlaja
d1994d1ac2 [test/any2ppm] Daemonize without BSD's daemon().
Solaris libc doesn't provide daemon() so implement
any2ppm daemon's detaching without it.
2009-06-18 16:07:38 +01:00
M Joonas Pihlaja
c4c0693169 [test] Make test constructors without perl.
Remove the dependency on perl when building the test suite
by replacing the script which makes cairo-test-constructors.c
with a C program.
2009-06-18 15:41:19 +01:00
M Joonas Pihlaja
cdd27a8d4c [test] Never use gcc __attribute__ magic for constructors.
The configure test for __attribute__((constructor)) succeeds when
compiling with Sun Studio 12 on OpenSolaris but the attribute
is just ignored and has no actual effect.  This causes the test
suite to not run any tests at all.  With this patch we revert to
always using make-cairo-test-constructors.pl.
2009-06-18 15:39:16 +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
e003d665fe [test] Disable compilation of cairo-test-trace without shm_open()
Remember to only add cairo-test-trace to the list of EXTRA_PROGRAM so long
as we can actually compile it.
2009-06-13 19:18:11 +01:00
Chris Wilson
c092136fe9 [configure] Check for shm_open()
As needed for cairo-test-trace.
2009-06-13 19:07:37 +01:00
Chris Wilson
f298dd92ca [test] Remove dlmalloc
cairo-test-trace's shared memory allocation pattern is much simpler than
anticipated as it allocates a bunch of images and then frees them all,
and so only needs a simple linear allocator.
2009-06-13 19:07:00 +01:00