Commit graph

1430 commits

Author SHA1 Message Date
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
Chris Wilson
19f4498234 [test] Wrap yet another call to get_image_surface() inside a timeout.
I missed this call to get_image_surface() that is now being hit having
restored the reference image for dash-infinite-loop.
2009-07-28 12:58:07 +01:00
Chris Wilson
24b5ac6377 [test] Add timeouts around finishing and converting surfaces to images.
In order to catch infinite loops whilst replaying and converting vector
surfaces to images (via external renderers) we need to also install
alarms around the calls to finish() and get_image().
2009-07-28 08:41:50 +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
d31de83e01 Mark curve-to-as-line-to as XFAIL for PS backend.
Looks like ghostscript has a similar buggy optimization like we
just fixed in cairo. I'm just waiting on a new bugzilla account
from bugs.ghostscript.com after which I plan to report the bug
there.
2009-07-27 15:58:27 -07: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
ede0f7e7df [pdf] Eliminate redundant whole-page clip.
We do not to emit a clip if it covers the whole page.
2009-07-27 10:18:20 +01:00
Chris Wilson
4dc62bbedc [test] Extend radial gradients to check r2 < r1
Include additional gradients to cover the cases where r1 > r2, as a pixman
bug was exposed by:
   [Bug 22908] Invalid output of radial gradient
   http://bugs.freedesktop.org/show_bug.cgi?id=22908
2009-07-24 10:44:03 +01:00
Chris Wilson
e98e2690cb [test] Fix use of uninitialized widths.
user-font-rescale copied unitialized values from the widths array into
the desired array. Although these corresponded to unused glyphs and so
were never used during the rendering, the values may have been illegal
causing FPE as they were copied.
2009-07-24 10:44:03 +01:00
Chris Wilson
596dec9561 [test] Trap SIGFPE
Note the crash if we hit a floating-point exception.
2009-07-24 10:44:03 +01:00
Chris Wilson
5d8f366581 [test] clip representation is no longer surface dependent
So we can test the api just once in the preamble and not per-target.
2009-07-23 16:36:02 +01:00
Chris Wilson
c3f2db4f73 [drm] Add an accelerated image surface.
Use the DRM interface to h/w accelerate composition on image surfaces.
The purpose of the backend is simply to explore what such a hardware
interface might look like and what benefits we might expect.  The
use case that might justify writing such custom backends are embedded
devices running a drm compositor like wayland - which would, for example,
allow one to write applications that seamlessly integrated accelerated,
dynamic, high quality 2D graphics using Cairo with advanced interaction
(e.g. smooth animations in the UI) driven by a clutter framework...

In this first step we introduce the fundamental wrapping of GEM for intel
and radeon chipsets, and, for comparison, gallium. No acceleration, all
we do is use buffer objects (that is use the kernel memory manager) to
allocate images and simply use the fallback mechanism. This provides a
suitable base to start writing chip specific drivers.
2009-07-23 16:18:42 +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
Chris Wilson
1ae5942a3a Merge commit 'anholt/gl'
Conflicts:
	boilerplate/Makefile.sources
	boilerplate/cairo-boilerplate.c
	build/configure.ac.features
	src/cairo.h
	util/cairo-script/Makefile.am
2009-07-21 22:28:44 +01:00
Chris Wilson
809f77a5cb [test] Summarise tests that fail during the preamble.
Some tests only run and check during the preamble phase, and those
failures were being ignored during the summary.
2009-07-20 18:56:10 +01:00
Chris Wilson
dbaa08e80b [test] Fallback to comparing the base image references
After looking at backend specific images, check against the base image
reference. This is useful to fallback surfaces like xlib-fallback, which
should look closer to the image backend than the xlib backend.
2009-07-20 18:56:10 +01:00
Chris Wilson
164e0d2ea3 [test] Misidentification of XFAIL as NEW
cut'n'paste error compared the image against the known failure instead of
any recorded new failure, when checking for NEW fails.
2009-07-20 18:56:10 +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
52fa8760ae Add OpenVG backend.
Based on the work by Øyvind Kolås and Pierre Tardy -- many thanks to
Pierre for pushing this backend for inclusion as well as testing and
reviewing my initial patch. And many more thanks to pippin for writing the
backend in the first place!

Hacked and chopped by myself into a suitable basis for a backend. Quite a
few issues remain open, but would seem to be ready for testing on suitable
hardware.
2009-07-17 11:50:02 +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
655a4dbc36 [test] Track XFAIL using expected results stored as xfail.png
Instead of tagging the sources, which is insensitive to changes, track the
known failure modes by recording the current fail as an xfail.png
reference. (We also introduce a new.png to track a fresh error, so that
they are not lost in the noise of the old XFAILs and hopefully do not
cause everyone to fret).

As we have removed the XFAIL tagging we find, surprise surprise, that some
tests are now working -- so review all the reference images (as also some
.ref.png now should be .xfail.png).

Note: I've only checked image,pdf,ps,svg. The test surfaces report some
failures that probably need to addressed in source. I've not correct the
changes for win32 and quartz. Nor fixed up the experimental backends.
2009-07-13 15:19:51 +01: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
M Joonas Pihlaja
9686331cb0 [spans] Round rasterization grid pixel areas instead of truncating.
When converting a grid pixel area into the range [0,255] the
GRID_AREA_TO_ALPHA() macro would truncate extra bits off the result
rather than rounding. This could cause seams between abutting
collinear edges of separately rendered polygons even when the
coordinates of the abutting edges were the same.

Reported by Soeren Sandmann on the cairo mailing list:

http://lists.cairographics.org/archives/cairo/2009-May/017043.html
2009-07-10 19:06:48 +03:00
Chris Wilson
4bb157672e [test] Rename some structures within cairo-test-trace
Simply rename a few structures so that their names are less confusing with
the mix of process and threads used to executes traces.
2009-07-05 09:22:44 +01:00
Chris Wilson
88cb69b10c [boilerpate] Move target definition to backends.
By moving the backend target definition out of the massive amlagamated
block in cairo-boilerplate.c and into each of the
cairo-boilerplate-backend.c, we make it much easier to add new targets as
the information need only be entered in a single file and not scattered
across three. However, updating the target interface means trawling across
all the files -- except given that I found it difficult maintaining the
single massive array I do not see this as an increase in the maintenance
burden.
2009-07-04 21:43:27 +01:00
Chris Wilson
fef3649953 [script] Fix the trivial errors running the test suite
A few typos crept in breaking the script output and various refreshes of
the expected results.
2009-07-04 18:32:57 +01:00
Chris Wilson
2395bba1e6 [any2ppm] Choose a more appropriate format for the replay content
Actually select a format that matches the request content when replaying
the script to an image.
2009-07-04 18:31:49 +01:00
Chris Wilson
6003ab77e1 Export meta-surface
The meta-surface is a vital tool to record a trace of drawing commands
in-memory. As such it is used throughout cairo.

The value of such a surface is immediately obvious and should be
applicable for many applications. The first such case is by
cairo-test-trace which wants to record the entire graph of drawing commands
that affect a surface in the event of a failure.
2009-07-03 18:26:50 +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
b2e2a2f31a [test] Update argb32 pdf reference image for trap-clip 2009-07-02 15:01:41 +02:00
Carlos Garcia Campos
910afc7a8e [test] Mark all smask tests as XFAIL for pdf
Those tests use linear gradients which are not correctly handled by
poppler yet. See https://bugs.freedesktop.org/show_bug.cgi?id=10942
2009-07-02 15:01:33 +02: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
9d538ef337 [test] Update argb32 and rgb24 pdf reference image for mask 2009-07-02 14:56:39 +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
8a6bdc63c1 [test] Update argb32 and rgb24 pdf reference image for text-pattern 2009-07-02 14:56:22 +02:00
Carlos Garcia Campos
b46ba7aa33 [test] Update pdf reference image for text-transform 2009-07-02 14:56:14 +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
e6576e8912 [test] Update argb32 pdf reference image for clip-operator 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