Commit graph

1900 commits

Author SHA1 Message Date
Chris Wilson
7894abbe6d [test] Support foreground only execution.
Add an option to prevent forking - which makes it difficult to
valgrind/gdb individual tests.
2008-11-19 11:59:20 +00:00
Chris Wilson
97edc680c1 [twin] Reduce tolerance.
As the glyphs are rendered to cache, ensure that they are rendered at the
highest quality settings.
2008-11-19 11:59:20 +00:00
Chris Wilson
e50538863a [twin] Tweak line width.
Slightly increase line width to eliminate internal holes in the characters
where the strokes were not quite overlapping.
2008-11-19 11:59:20 +00:00
Chris Wilson
3a82f94398 [test] Add util/cairo-script to include path.
any2ppm needs the include path for cairo-script-interpreter so that it can
be built without an existing install.
2008-11-16 18:21:52 +00:00
Chris Wilson
a2eff7c7de [test] Add build rule for libcairo-script-interpreter.la
Add a rule to build the cairo-script-interpreter on behalf of any2ppm.
2008-11-16 16:21:37 +00:00
Chris Wilson
bf309aab60 [configure] Delete CAN_TEST_SCRIPT
A CairoScript interpreter is built under utils and so is always available.
2008-11-16 16:21:37 +00:00
Chris Wilson
cdfffc7420 Add CairoScript interpreter
Add a CairoScript interpreter library and use it to replay the test output
for the CairoScript backend. The library is also used by the currently
standalone Sphinx debugger [git://anongit.freedesktop.org/~ickle/sphinx].
The syntax/operator semantics are not yet finalized, but are expected to
mature before the next stable release.
2008-11-13 11:36:55 +00:00
Chris Wilson
a856371bef Add CairoScript backend.
A new meta-surface backend for serialising drawing operations to a
CairoScript file. The principal use (as currently envisaged) is to provide
a round-trip testing mechanism for CairoScript - i.e. we can generate
script files for every test in the suite and check that we can replay them
with perfect fidelity. (Obviously this does not provide complete coverage
of CairoScript's syntax, but should give reasonable coverage over the
operators.)
2008-11-13 11:36:54 +00:00
Chris Wilson
9afad53730 [test] Expand in-fill-trapezoid
Test vertices and edges of a rectangle to probe 'corner-cases', using the
insideness conditions from flash.
2008-11-13 11:36:42 +00:00
Chris Wilson
cd2e18ddc6 [test] Fix-up rgb byte packing
Another embarrassing, but thankfully, trivial bug.
2008-11-07 19:35:26 +00:00
Chris Wilson
2554d17598 [surface] Pass a separate closure for the mime-type destroy notifier.
A limitation of the current API was that the destroy notifier was called
on the mime-data block. This prevents the user from passing in a pointer
to a managed block, for example a mime-data block belonging to a
ref-counted object. We can overcome this by allowing the user to specify
the closure to be used with the destroy notifier.
2008-11-07 19:30:33 +00:00
Chris Wilson
9dee7af41f [test] Add off-centre tests to in-fill-trapezoid.
Reading through the previous commit spotted that the arguments to
edge_compare_for_y_against_x were transposed, but the test-suite had
failed to catch detect it. This is due that in order to actually
solve the equation we need to have a diagonal edge passing near an
off-centre point of interest, which was not among the test cases. So add
some off-centre tests to fully exercise the code.
2008-11-06 01:06:20 +00:00
Chris Wilson
0ac9846159 [test] Add WINDING variants to in-fill test
Check cairo_in_fill() with some WINDING tests as well as the current
EVEN_ODD.
2008-11-06 00:06:12 +00:00
Chris Wilson
34564aa84a [test/pdf2png] Remove dependency on GdkPixbuf
It's appears to be dropped from the current poppler trunk, so just use our
own venerable cairo_surface_write_ton_png().
2008-11-05 19:27:49 +00:00
Chris Wilson
d63267e4e7 [test] Update mime-data to check image/png
Add a "image/png" mime-type test.
2008-11-05 18:13:10 +00:00
Chris Wilson
199c0e7113 [svg] Embed jpeg data.
Support jpeg embedding for svg output.
2008-11-05 15:13:02 +00:00
Chris Wilson
29621bd399 [matrix] Remove stray offset from previous commit.
I moved the pixel centre to xc,yc but forgot to remove it during
compensation - as caught by the test suite.

Refresh a couple of reference images that depend upon exact pixel-centre
rounding conditions.
2008-11-05 12:16:47 +00:00
Chris Wilson
c95eebc923 [pattern] Split the translation between the matrix and [xy]_offset
pixman limits the src] co-ordinates (and thus [xy]_offset] to 16bits,
so we need to be careful how much of the translation vector to push into
[xy]_offset. Since the range is the same for both, split the integer
component between the matrix and the offset.

test/scale-offset* now at least shows the source image, even if it is
misplaced.
2008-11-05 10:00:13 +00:00
Chris Wilson
68309481aa [test] Mark targets with is_meta?
Allow tests to skip targets based on whether they are a meta surface or
not.
2008-11-05 08:36:01 +00:00
Chris Wilson
8855f9583e [test] Add scale-offset-(similar|image)
Add a test case for the scaling bug reported by Michel Iwaniec:
http://lists.cairographics.org/archives/cairo/2008-November/015660.html
2008-11-05 08:01:27 +00:00
Chris Wilson
aad9809003 [test] Only depend on any2ppm if we build it.
Do not add a dependency to any2ppm if it has been deconfigured.
2008-11-05 08:01:27 +00:00
Chris Wilson
59bdeba9ab [matrix] Minimise pixman conversion error.
Minimise the error of the pixman matrix about the centre of the displayed
area rather than the origin.
2008-11-05 08:01:27 +00:00
Chris Wilson
3f7a21c5c9 [test] Add jpeg.jpg to EXTRA_DIST
Forgot to add the new file to the distribution with the previous commit.
2008-11-04 13:46:10 +00:00
Chris Wilson
9900a2adf3 [test] Update mime-data jpeg reference data.
<adrianj> ickle_: If we are going to use a different image for jpeg in
mime-data maybe we could create a jpg that contains the text "jpeg". That
way when support for the other image formats is added the mime-data test
could have one image for each type with each image and it is easy to see
that each image is the correct one.
2008-11-04 13:41:02 +00:00
Chris Wilson
c13a09ddb4 [test] Use a different jpeg image for mime-data
Detect when we successfully encode the JPEG data from the mime-type by
using a completely image.
2008-11-04 13:03:24 +00:00
Chris Wilson
8407470409 [test] Adapt pdf-mime-data for non-srcdir build.
Need to look for reference/input images from srcdir as well.
2008-11-04 13:03:24 +00:00
Chris Wilson
8007618837 [test] Fix compilation of imagediff.
imagediff broke once again.
2008-11-04 13:03:24 +00:00
Adrian Johnson
73bc278c7a Add pdf mime data test
To test that images in PDF files correctly embedded the mime data.
2008-11-04 22:39:36 +10:30
Chris Wilson
43e2370b02 [test] Update extend-pad.
extend-pad was not a clear demonstration of the EXTEND_PAD mode, so revamp
it to show the filter extending a 4 pixel surface to cover the entire
output. However, this hides a discrepancy with the vector surfaces that we
cannot prevent the external renders from applying an interpolation to the
border pixels, so we copy the original test to extend-pad-border to check
the desired behaviour on boundary pixels.
2008-11-03 14:24:59 +00:00
Chris Wilson
b3462c5616 [test] Convert a few residual '-out.*'
Catch a few -out.* hiding in boilerplate.
2008-11-03 14:24:39 +00:00
Chris Wilson
8fc3d0ffeb [mime-data] Allow embedding of arbitrary mime-types.
Use the surface user-data array allow to store an arbitrary set of
alternate image representations keyed by an interned string (which
ensures that it has a unique key in the user-visible namespace).

Update the API to mirror that of cairo_surface_set_user_data() [i.e.
return a status indicator] and switch internal users of the mime-data to
the public functions.
2008-11-03 11:24:12 +00:00
Adrian Johnson
1685bbee1b test/README: fix typo 2008-11-02 20:12:30 +10:30
Adrian Johnson
ed2081d974 Specify a background color for XFAIL text
To improve readability on terminals with a white background.
2008-11-02 15:05:07 +10:30
Chris Wilson
ab8a0bfd82 Add a COPYING file to each aux. source directory
Include a COPYING inside perf/, test/, util/ to clarify the licensing
conditions beneath the respective directories. This is because cairo
itself (libcairo.so) is LGPL-2.1/MPL-1.1 but that only relates to src/.
The auxiliary source files are under a mix of free licenses and we wish to
be clear just what license applies to each file.

In particular, cairo-trace needs to include the GPL terms and conditions.
2008-10-31 16:14:14 +00:00
Chris Wilson
992f74d884 [test] Use '.' as the field separator in the names
We frequently use '-' within the test name or format name and so we
encounter confusion as '-' is also used as the field separator. At times
this has caused a new test to break an old test because the new test would
match one of the old test's target specific reference images. So switch
everything over to use '.' between fields (test name, target, format,
subtest, etc.).
2008-10-31 13:50:55 +00:00
Chris Wilson
e90073f7dd [test] Build test suite into single binary.
Avoid calling libtool to link every single test case, by building just one
binary from all the sources.

This binary is then given the task of choosing tests to run (based on user
selection and individual test requirement), forking each test into its own
process and accumulating the results.
2008-10-31 12:30:11 +00:00
Adrian Johnson
05fce5bced PS/PDF: Set image Interpolation flag
If the filter mode is anything other than DEFAILT, FAST or NEAREST set the
Interpolate flag in the image dictionary so that a smoothing filter is
applied when rasterising the vector file.

As we have no control over the implementation of the Interpolate filter
(the PS/PDF specifications leave it undefined) we need to capture the
output of poppler/GS and update our reference images. (For a couple of
tests, the filtering is irrelevant so for those we set the filter to
NEAREST.)

Note that GhostScript's Interpolate filter does not work on rotated images
(and a variety of other transformations) so several of the PS reference
images have use nearest-neighbour sampling instead of a bilinear filter.
2008-10-30 21:24:54 +00:00
Chris Wilson
ef98eb26f7 [test] Reenable device offset testing.
Restore device offset testing that was temporarily disable in the run up
to the 1.8 release.
2008-10-30 19:23:17 +00:00
Chris Wilson
4f2f46ef1b Restore the ability to choose the internal font.
Behdad wants to include the feature with 1.10, so we enable it as early as
possible in 1.9 dev cycle to generate as much feedback as possible.

The first change is to use "<cairo>" as being a name unlikely to clash
with any real font names.

This reverts commits:
  a824d284be,
  2922336855,
  e0046aaf41,
  f534bd549e.
2008-10-30 19:14:45 +00:00
Chris Wilson
cc109df2a7 [test] Update .gitignore
Add a couple of new programs to gitignore.
2008-10-30 17:52:15 +00:00
Chris Wilson
ab15d76275 [test] Remove XFAIL from user-font-mask
user-font-mask should PASS modulo the scaling anomalies in the external
renderers, so remove it from the XFAIL list.
2008-10-30 16:54:23 +00:00
Chris Wilson
540f555840 [analysis] Only limit to mask extends if bounded by mask.
The extents of cairo_mask() is only limited to the mask if the operation
is bounded by the mask.
2008-10-30 16:19:54 +00:00
Behdad Esfahbod
e51648b601 [test/xlib-expose-event] Save the output image to disk 2008-10-30 04:43:45 -04:00
Carl Worth
f534bd549e Remove test/twin-ref.png.
I missed this in a previous commit, (I think I had used a
pattern of twin-*-ref.png which of course didn't match
this file).
2008-10-29 21:30:00 -07:00
Carl Worth
2922336855 Remove twin test case.
This test relied on the recently-removed ability to select
the internal twin-based font family with a name of "cairo".

Presumably, we'll want to bring this test case back when
some other means of requesting that font face is added.
2008-10-29 16:25:00 -07:00
Carl Worth
81439b3bc8 Add missing files to CLEANFILES and DISTCLEANFILES.
Without these files in these lists, "make distcheck" is unhappy.
2008-10-29 16:19:30 -07:00
Carl Worth
dd0416f5d4 Add recently added reference images to REFERENCE_IMAGES list.
This is just part of the make-distcheck routine for me. I know
Behdad added a test to check for missing images in the list, but
it doesn't seem to be getting run automatically as part of
'make test' nor 'make distcheck', (or if it it, then I'm not
noticing its output).
2008-10-29 16:19:29 -07:00
Chris Wilson
9cd9644c1d [test] Add a pass-through test.
Check that colour values are correctly passed through all the backends.
Simple test of the most fundamental functionality.
2008-10-29 22:04:34 +00:00
Carl Worth
0ca6ba18e3 Add note to test/README on running with Xvfb.
This X server has been tested to run through the test suite with
no unexpected failures, and it avoids hitting any X-driver-specific
bugs.
2008-10-28 17:15:42 -07:00
Carl Worth
a94928ddfa Add svg-specific reference images for the twin test.
A bit annoying that I have to add the same image as both -svg11
and -svg12 but that's all the support we have in the current
test suite. I suppose I could avoid doing that by figuring out
why this test case cannot successfully roundtrip through librsvg
and back through cairo.
2008-10-28 15:55:38 -07:00