path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2009-08-29[test] Stress the intersection handling by feeding spans/traps random curvesChris Wilson14-0/+175
Another stress test for the fill/stroke and intersection finders.
2009-08-29[tessellator] Special case rectilinear tessellationChris Wilson2-0/+0
For the frequent cases where we know in advance that we are dealing with a rectilinear path, but can not use the simple region code, implement a variant of the Bentley-Ottmann tessellator. The advantages here are that edge comparison is very simple (we only have vertical edges) and there are no intersection, though possible overlaps. The idea is the same, maintain a y-x sorted queue of start/stop events that demarcate traps and sweep through the active edges at each event, looking for completed traps. The motivation for this was noticing a performance regression in box-fill-outline with the self-intersection work: 1.9.2 to HEAD^: 3.66x slowdown HEAD^ to HEAD: 5.38x speedup 1.9.2 to HEAD: 1.57x speedup The cause of which was choosing to use spans instead of the region handling code, as the complex polygon was no longer being tessellated.
2009-08-29Eliminate self-intersecting strokes.Chris Wilson146-37/+235
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[test] Minor tweak of ft-text-vertical-layoutChris Wilson2-7/+4
Tidily destroy the font immediately after use.
2009-08-26[test] Remove misleading code/comments from a1-image-sampleChris Wilson1-4/+0
2009-08-26[test] Attempt to automatically detect running under gdbChris Wilson1-0/+32
A common mistake is to forget to pass the foreground mode to cairo-test-suite when launching it under the debugger, resulting in the debugger not attaching to the children and missing the error you were trying to capture. Under linux, we can inspect the path to our parent's executable and if that looks like gdb, we assume it is and disable forking of traces.
2009-08-26[test] Exit on first failure '-x'Chris Wilson1-2/+13
Add a command line option to the test suite to cause it to exit after the first failure. The purpose of this is for integration into 'git bisect run', where the failing test is unknown and we are looking for any failure. For example, for use in a regression script to find commits in the midst of as series that need a refresh of a reference image (or fixing!).
2009-08-17[test] Update reference image for the extended-blend-mode test.Søren Sandmann Pedersen1-0/+0
A recent pixman change caused one-bit differences in some pixels.
2009-08-06[boilerplate/test] Convert make-*-constructors to shellChris Wilson3-169/+28
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-07-31[gl] Refresh clip-operator ref.Chris Wilson2-0/+1
A minor renderering difference, acceptable.
2009-07-31[test] Add clip-fill.Chris Wilson7-0/+83
Test filling through a complex clip.
2009-07-31[test] Add clip-textChris Wilson7-0/+93
Test applying a complex clip to text.
2009-07-29[test] Yet another bug in curve-to as line-to.Chris Wilson5-0/+102
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-28[test] Wrap yet another call to get_image_surface() inside a timeout.Chris Wilson1-0/+3
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[test] Add timeouts around finishing and converting surfaces to images.Chris Wilson1-4/+10
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[test] Test extremely small dash lengths.M Joonas Pihlaja4-0/+85
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:
2009-07-28[test] Add degenerate-curve-toChris Wilson5-0/+106
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-27Mark curve-to-as-line-to as XFAIL for PS backend.Carl Worth1-0/+0
Looks like ghostscript has a similar buggy optimization like we just fixed in cairo. I'm just waiting on a new bugzilla account from after which I plan to report the bug there.
2009-07-27Merge branch 'master' of Worth16-21/+163
2009-07-27Add new test: curve-to-as-line-toCarl Worth3-0/+96
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[test] Overlapping glyphsChris Wilson7-0/+128
Add a test case to explicitly check handling of overlapping glyphs.
2009-07-27[pdf] Eliminate redundant whole-page clip.Chris Wilson4-0/+0
We do not to emit a clip if it covers the whole page.
2009-07-24[test] Extend radial gradients to check r2 < r1Chris Wilson3-13/+23
Include additional gradients to cover the cases where r1 > r2, as a pixman bug was exposed by: [Bug 22908] Invalid output of radial gradient
2009-07-24[test] Fix use of uninitialized widths.Chris Wilson1-8/+5
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[test] Trap SIGFPEChris Wilson1-0/+7
Note the crash if we hit a floating-point exception.
2009-07-23[test] clip representation is no longer surface dependentChris Wilson1-126/+74
So we can test the api just once in the preamble and not per-target.
2009-07-23[drm] Add an accelerated image surface.Chris Wilson2-1/+2
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-23Remove clip handling from generic surface layer.Chris Wilson102-38/+230
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-22[gl] Update reference imagesChris Wilson15-0/+14
2009-07-21Merge commit 'anholt/gl'Chris Wilson1-0/+1
Conflicts: boilerplate/Makefile.sources boilerplate/cairo-boilerplate.c build/ src/cairo.h util/cairo-script/
2009-07-20[test] Summarise tests that fail during the preamble.Chris Wilson1-24/+85
Some tests only run and check during the preamble phase, and those failures were being ignored during the summary.
2009-07-20[test] Fallback to comparing the base image referencesChris Wilson1-68/+163
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[test] Misidentification of XFAIL as NEWChris Wilson1-1/+1
cut'n'paste error compared the image against the known failure instead of any recorded new failure, when checking for NEW fails.
2009-07-20Cross-compilation fix for boilerplate/testPierre Tardy1-1/+1
2009-07-17[test] Add a simplified CLEAR test.Chris Wilson7-0/+91
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-17Add OpenVG backend.Chris Wilson2-1/+3
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-15Fix build under distcheckChris Wilson2-8/+14
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-14[test] Reconstruct REFERENCE_IMAGESChris Wilson1-271/+178
Rebuild the list from scratch using the contents of my git working tree.
2009-07-14Use new pixman extended blend operatorsBenjamin Otte8-0/+238
It also adds extended-blend tests. Based on a previous patch by Emmanuel Pacaud <>
2009-07-13[test] Track XFAIL using expected results stored as xfail.pngChris Wilson382-303/+438
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[test] Sanitise REFERENCE_IMAGESChris Wilson8-6/+0
Add and delete files to satisfy 'make check-ref-missing'.
2009-07-13[test] Update reference images for gs 8.64Chris Wilson9-3/+6
2009-07-10[spans] Round rasterization grid pixel areas instead of truncating.M Joonas Pihlaja22-0/+0
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:
2009-07-05[test] Rename some structures within cairo-test-traceChris Wilson1-112/+112
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-04[boilerpate] Move target definition to backends.Chris Wilson1-13/+15
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[script] Fix the trivial errors running the test suiteChris Wilson3-2/+2
A few typos crept in breaking the script output and various refreshes of the expected results.
2009-07-04[any2ppm] Choose a more appropriate format for the replay contentChris Wilson1-1/+14
Actually select a format that matches the request content when replaying the script to an image.
2009-07-03Export meta-surfaceChris Wilson2-38/+25
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[test] Record trace to an in-memory meta-surfaceChris Wilson2-42/+332
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-02[test] Update argb32 pdf reference image for trap-clipCarlos Garcia Campos1-0/+0