Commit graph

1179 commits

Author SHA1 Message Date
Chris Wilson
86356a9578 [test] Add degenerate-dash to XFAIL.
PS (ghostscript) interprets the degenerate end-caps quite differently, and
perhaps slightly more rationally... Add this to XFAIL, until we have a
definitive specification on how we should behave.
2008-10-20 23:04:03 +01:00
Chris Wilson
9529699028 [test/user-font-rescale] Check and propagate errors.
We need to check the error status on set_user_data() to be sure that the
data has been set and error otherwise.
2008-10-19 09:36:49 +01:00
Chris Wilson
683de2fea2 [test/user-font[-proxy]] Check for error from set_user_data().
Check in case we fail to attach our user_data.
2008-10-18 09:55:15 +01:00
Chris Wilson
1983929900 [test/bitmap] Leak on error path.
Free the FcPattern on error.
2008-10-18 09:55:15 +01:00
Chris Wilson
0409be426c [test/font-matrix-translation] Check for OOM
First check that querying the extents did not trigger NO_MEMORY.
2008-10-18 09:55:08 +01:00
Chris Wilson
21360bf674 [test/source-surface-big-scaled-down] Propagate error.
Propagate error to source.
2008-10-18 09:55:07 +01:00
Chris Wilson
794160c35b [test/surface-pattern] Propagate error.
Use cairo_get_target() to propagate error from secondary context.
2008-10-18 09:55:07 +01:00
Chris Wilson
0f48cce8d9 [test/source-clip-scale] Propagate error.
Use cairo_get_target() to propagate error from secondary context.
2008-10-18 09:55:07 +01:00
Chris Wilson
6cdbd132ce [test/source-clip] Propagate error.
Use cairo_get_target() to propagate error from the secondary context.
2008-10-18 09:55:07 +01:00
Chris Wilson
f86f233b3e [test/smask] Propagate error.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-18 09:55:07 +01:00
Chris Wilson
4490a6c363 [test/stroke-image] Propagate error
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-18 09:55:07 +01:00
Chris Wilson
6e6d7e52a3 [test/mask] Propagate error from secondary context.
Reset the source every time so that the error is propagate from the
secondary context using cairo_get_target().
2008-10-18 09:55:07 +01:00
Chris Wilson
a56d4530d6 [test/smask-text] Propagate error.
Use cairo_get_target() to propagate error from the secondary context.
2008-10-18 09:55:07 +01:00
Chris Wilson
b1e884cd89 [test/smask-stroke] Propagate error.
Use cairo_get_target() to propagate the error from the secondary context.
2008-10-18 09:55:07 +01:00
Chris Wilson
546fbc2c0c [test/smask-paint] Propagate error.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-18 09:55:06 +01:00
Chris Wilson
8bd6913282 [test/smask-mask] Propagate error.
Use cairo_get_target() to propagate errors from the secondary contexts.
2008-10-18 09:55:06 +01:00
Chris Wilson
9c0fe6c61e [test/smask-image-mask] Propagate error.
Use cairo_get_target() to propagate any error status from the secondary
context.
2008-10-18 09:55:06 +01:00
Chris Wilson
373d6c76b6 [test/smask-fill] Propagate error status.
Use cairo_get_target() to propagate the error from the secondary context.
2008-10-18 09:55:06 +01:00
Chris Wilson
bb05beaab6 [test/show-glyphs-many] Check for NO_MEMORY
As we do a manual status check, we need to perform a full check.
2008-10-18 09:55:06 +01:00
Chris Wilson
c0a4ef76e1 [test/composite-integer-translate-over-repeat] Propagate error.
Use cairo_get_target() to propagate any errors from the secondary context.
2008-10-18 09:55:06 +01:00
Chris Wilson
4a9e0f0e5b [test/mask] Propagate error from secondary context.
Use cairo_get_target() to infect the primary context with any errors
raised whilst drawing the mask.
2008-10-18 09:55:06 +01:00
Chris Wilson
eaec1caa94 [test/ft-text-*] Check for errors from fontconfig.
If a match cannot be found, or if any other error occured, then fontconfig
will return NULL. Check and propagate.
2008-10-18 09:55:06 +01:00
Chris Wilson
336eddfdbb [test/get-clip] Check the status on the secondary context.
As we solely use a secondary context, we must manually report NO_MEMORY
errors whilst running under memfault.
2008-10-18 09:55:06 +01:00
Chris Wilson
d48f934051 [test/clip-operator] Propagate error from secondary context.
Use the cairo_get_target() to propagate any errors from the secondary
context.
2008-10-17 22:52:47 +01:00
Chris Wilson
bccfdf7d93 [test] Add support for memfault.
Add the core support to cairo-test for running the test-suite under a
malloc fault injector. This commit contains the adjustments to
cairo_test_run() to repeat the test if it detects a failure due to fault
injection and complains if it detects unreported faults or memory leaks.
2008-10-17 22:52:47 +01:00
Chris Wilson
5fcfc7ebc9 [test/README] Document all fonts used.
Do a little leg-work to answer a query in a bug report and document the
results.
2008-10-17 10:38:55 +01:00
Adrian Johnson
ff9ee74b37 Revert unintended changes to test/fallback-resolution.c in the previous commit 2008-10-16 17:29:33 +10:30
Adrian Johnson
5911c6966d Use correct inverse ctm for stroke in meta surface replay
This fixes #9189 Dashed strokes too long in fallback images
2008-10-16 17:22:48 +10:30
Chris Wilson
6afcd82118 [test] Add a spline test.
Test the decomposition of 5 different types of spline curve. Useful test
for future experiments in improving the decomposition algorithm.

Note: the vector targets all need separate reference images due to their
lack of support for cairo_set_tolerance(). Also GS strokes the Bezier
curve differently using offset curves and opposed to transcribing the
outline of a pen.
2008-10-15 23:27:11 +01:00
Chris Wilson
595414bb78 [test/fallback-resolution] Extend to cover separate ppi x/y.
Adrian Johnson proposed a hack that fixed the current test by simply
scaling the dashed stroke by device_transform.xx. Obviously this exposes a
deficiency in the test case. So add an outer loop to iterate over several
common ppi for both x and y and in doing so reveal more ugly artifacts in
the current fallback code.
2008-10-14 14:24:49 +01:00
Chris Wilson
9886cb3353 [pattern] Only perform non-integer optimization for identity matrices.
A complication I realised after pushing 3eb4bc3 was handling larger
sampled areas.  Extending the test case revealed that the optimization
was broken for anything but the identity transform (after removing the
translation).  Correctness first, leaving the "pixel-exact" solution for
interested reader...
2008-10-14 10:27:21 +01:00
Chris Wilson
3eb4bc3757 [pattern] Optimize away fractional translation for NEAREST patterns.
As identified in bug 15479,
  Unpredictable performance of cairo-xlib with non-integer translations of a
  source surface pattern
  (https://bugs.freedesktop.org/show_bug.cgi?id=15479),
source surfaces with a fractional translation hit slow paths for some
drivers, causing seemingly random performance variations. As a work-around
Owen Taylor proposed that cairo could convert non-integer translations on
NEAREST sources patterns to their integer equivalents.

The messy detail involved here is replicating the rounding mode used by
pixman for the sample offset, but otherwise the conversion is fairly
trivial.
2008-10-13 23:34:51 +01:00
Chris Wilson
1d3453eee5 [pattern] Rescale the linear pattern matrix to avoid overflow.
As proof-of-principle, compute a scale factor to avoid overflow when
converting a linear pattern to pixman_fixed_t. Fixes test/huge-pattern,
but the principle should be extended to handle more cases of overflow.
2008-10-12 11:38:42 +01:00
Chris Wilson
6736faba3e [test/any2ppm] Do not attempt to compile PS without spectre
Since CAN_TEST_PS_SURFACE does not currently require spectre, we were
attempting to compile in spectre support for any2ppm even on systems
without libspectre installed. Fix that by adding a separate flag for
CAIRO_HAS_SPECTRE.
2008-10-11 19:01:43 +01:00
Benjamin Otte
b358711162 [test] Add huge pattern.
Add a test case to exercise range overflow during gradient construction.
2008-10-11 18:12:29 +01:00
Chris Wilson
7707027081 [test] Use _POSIX_C_SOURCE for flockfile.
From bug 18010 (https://bugs.freedesktop.org/show_bug.cgi?id=18010),
in order to make flockfile() available we need to set _POSIX_C_SOURCE and
according to the man page, the appropriate feature check is
_POSIX_THREAD_SAFE_FUNCTIONS.
2008-10-11 18:12:28 +01:00
Carlos Garcia Campos
8ac8e8c523 [test] Add ps2png check program using libspectre
Add a simple program to compliment pdf2png and svg2png.
2008-10-09 12:25:08 +01:00
Carlos Garcia Campos
3e6afb353d [test/any2ppm] Enable PS conversion using libspectre.
Complete the vector trilogy using libspectre to provide a similar
interface (to poppler and librsvg) around GhostScript.
2008-10-09 12:25:08 +01:00
Benjamin Otte
c647c0bbca [TEST] make imagediff work again
It seems to have bitrotten
2008-10-09 13:22:01 +02:00
Chris Wilson
96b083d3f0 [test] Exercise degenerate dashes.
Add a test case to capture the current behaviour when a segment ends on
an off/on dash transition.

Originally filed as bug:
  Miter artifacts for dashed strokes
  https://bugs.freedesktop.org/show_bug.cgi?id=17973
2008-10-08 19:04:42 +01:00
Chris Wilson
565c02a37e [svg] Use finer-grained fallbacks for SVG 1.2
The use of fine-grained fallbacks requires the native support of the
SOURCE operator applied to an image on the target surface. SVG 1.2
introduces the "comp-op:src" mode fulfilling this criteria - so we can
enable fine-grained fallbacks for 1.2+.

Update test/fine-grained-fallbacks to exercise this pathway in SVG 1.2 -
as SVG natively supported all the current operations within that test.
This reveals yet another librsvg bug in handling SVG 1.2.
2008-10-08 12:43:35 +01:00
Chris Wilson
308485a3fc [test] Add a test for a reported regression by Michael Natterer.
mitch reported on irc that expose events in the gimp were suffering from
artifacts which he tracked down to a bug with clipping and source
surfaces. This is the cairo test case for that regression.
2008-10-07 20:23:12 +01:00
Chris Wilson
8cf399b944 [test] Add a test to exercise the internal twin font
Although Behdad promises that the rendering is subject to improvement,
introduce a test to check consistency across platforms and update as
required.
2008-10-07 01:45:46 +01:00
Chris Wilson
4aa0991a11 [test] Mark fallback-resolution as XFAIL.
There appears to be no simple solution here, as it seems to be a
fundamental flaw in the design of the meta-surface wrt to replaying into
a fallback image. (I may be wrong, but if Carl found no easy solution then
I feel no shame for my own failure ;-)
2008-10-06 12:02:29 +01:00
Chris Wilson
02a56a4c84 [test/show-glyphs-many] Exercise xlib boundary conditions.
Within _cairo_xlib_surface_emit_glyphs() there are a number of
complications to do with packing as many glyphs as possible into a
single XRenderCompositeGlyph*() call. Essentially these consist of
choosing the right function and packing for the current glyphs, describing
runs of glyphs and ensuring that we do not exceed the maximum request size
within a single call. So we add to the test case we an attempt to show 64k
2-byte glyphs and an attempt to mix 64k 1-byte and 2-byte glyphs, with the
change-over point chosen to overflow the maximum request size, should
_cairo_xlib_surface_emit_glyphs() naively resize the current request.
2008-09-30 15:29:23 +01:00
Chris Wilson
2a347a92b0 [test/show-glyphs-many] Re-enable test to trigger crash in xlib.
Moral of this story is bugs cluster. If we made a mistake, especially in a
complicated bit of code that is interfacing with another library, then we
are likely to make a similar mistake in future. Disabling this test hid a
regression between 1.4 and 1.6.
2008-09-30 15:28:48 +01:00
Chris Wilson
d9f50d7841 [test/filter-nearest-offset] Remove XFAIL status
I swear that when I said that it was a rounding error, I was looking at an
image where the squares were overlapping the lines and had a listing of
all the coordinates used. However, the current output on all the machines
I have to hand is correct so I believe the underlying bug to be fixed.

Update the reference images for the external renderers because (a) GS
exhibits the same bug cairo had and (b) librvsg/PDF do not use NEAREST
when applying surface patterns, so the squares are blurred as a result.
2008-09-30 11:13:21 +01:00
Chris Wilson
7d5e6a18d5 [test/filter-nearest-offset] Paint a grey background
Avoid requiring (an absent!) rgb24 ref image by using an opaque grey
background. Confirm the reference image is identical to the old one
(modulo the background change) using GIMP.
2008-09-30 11:11:51 +01:00
Chris Wilson
41c66a9dfa [test/xlib-surface-source] Fix ill-timed XCloseDisplay
Sigh - finding a crasher in xlib seemed too good to be true. And it was.
The bug is due to the coupling of the XCloseDisplay with the user_data on
the source surface.

This was an externally trigger XCloseDisplay whilst the user had live
surfaces, so I consider this a gross application bug and therefore does
not require graceful handling within cairo-xlib. However, I'm willing to
listen to reason...
2008-09-29 15:33:09 +01:00
Chris Wilson
c23dbc4c61 [test/surface-source] Modify to trigger a crash.
Whilst investigating:
  Bug 7360 painting huge surfaces fails
  https://bugs.freedesktop.org/show_bug.cgi?id=7360
I found a particular combination of operations that cause a crash within
xlib, so I'm committing the test for posterity.
2008-09-29 13:54:12 +01:00