Commit graph

79 commits

Author SHA1 Message Date
Chris Wilson
cf426bce8e test: Add a simple coverage test.
This test case should be much clearer than half-coverage over what it
purports to actually test. In each pixel, it draws a single geometric
primitive that coverages a known percentage of the pixel and then we
measure how close the rasterisers are to that ideal.
2010-06-11 10:05:09 +01:00
Chris Wilson
1349728d1e test: Add partial coverage.
Another experiment in measuring consistency of rasterisation stratagems
across the backends.
2010-06-10 13:13:12 +01:00
Chris Wilson
85af0ec374 test: Add half-coverage to exercise the rasteriser with subpixel geometry. 2010-06-09 10:34:06 +01:00
Andrea Canciani
9b88b5dce5 test: add degenerate gradient and single stop tests
Add tests for degeneratate linear gradients (with start point equal
to the end point), degenerate radial gradients (start radius and end
radius equal to zero, same start and end circle) and gradients (both
linear and radial) with just a single stop.
2010-06-08 16:37:01 +02:00
Andrea Canciani
e8bc25fdb2 test: add linear-gradient-extend and radial-gradient-extend
Check that constant gradient to solid color optimization are only
applied if the extents permit it.
2010-05-14 22:26:40 +02:00
Benjamin Otte
ee32dfb3de test: Add a test for various zero mask operations 2010-05-13 12:11:05 +02:00
Chris Wilson
2e3acee410 test: Add gl-surface-source
Exercise using GL sources.
2010-05-06 14:38:55 +01:00
Chris Wilson
bf83bf00a7 test: Add subsurface-image-repeat
Test handling of source clipping with an image - principally to check
handling of mime types and zero-copy image snapshotting in the vector
surfaces and ensure that they work with subsurface patterns as well.
2010-05-06 10:53:48 +01:00
Chris Wilson
c6d7d054ca test: Add radial-gradient-mask
Exercise using radial gradients as a mask.
2010-05-05 10:44:43 +01:00
Chris Wilson
4dd92ef2bc test: Add subsurface-pad
Round out the subsurface tests with PAD.
2010-05-04 18:53:03 +01:00
Chris Wilson
85e3cffde1 test: Add subsurface-modify-{child,parent}
Add tests to ensure that modifications to the subsurface via the
original surface are tracked by the subsurface, i.e. that any snapshots
are detached upon modification of the parent as well as modification of
itself and vice versa.
2010-05-04 18:53:03 +01:00
Chris Wilson
8ded35fd69 ps: Enable native encoding of subsurface patterns.
Carefully handle subsurfaces of a recording surface through the analysis
and paginated surfaces so that we can generate a native pattern for the
vector backends, demonstrated by the PostScript backend.

Nothing remarkable, just a lot of bookkeeping to track the wrapped
surface types and to apply the correct offsets when generating the
subsurface pattern.
2010-04-30 10:16:24 +01:00
Benjamin Otte
1391403956 test: run xlib-expose-event test unconditionally 2010-04-28 13:15:09 +02:00
Chris Wilson
241ce933f8 test: Add clip-shape
cu found a bug when using clipping and fills with the image backend, but
it turns out to be the lost sign bug afflicting everything...

To trigger the bug requires evaluating the clip surface prior to using
in with _cairo_clip_combine_with_surface(). Which is taken along a
particular path when using a clip mask with non-pixel geometry on image,
but more easily hit by the fallback code.

Reported-by: <cairouser@yahoo.com>
2010-04-25 09:45:41 +01:00
Chris Wilson
567e485f28 test: Add clip-empty-group
Exercise a bug reported by Jeff Muizelaar whereby cairo_push_group() was
broken by everything being clipped out.
2010-04-23 14:47:51 +01:00
Benjamin Otte
5fed41ee2b test: Add test checking that all setters properly check surface->status
In particular, make sure that the setters when called on a const nil
surface don't try to set surface->status.
2010-04-14 22:45:18 +02:00
Chris Wilson
557016a86a test: Add clip-contexts
This should exercise a bug found by Jeff Muizelaar that
cairo-surface-clipper was mistakenly thinking that clip operations on a
second context was a no-op as the topmost clip path matched that of the
previous context.
2010-04-10 16:03:14 +01:00
Chris Wilson
697094488c test: Add inverse text
This is exercising a bug that I have introduced either in the xcb
backend or in the driver in my experimental branches. So simple, yet so
wrong.
2010-04-02 08:51:03 +01:00
Andrea Canciani
01e1821942 test: Add gradient-zero-stops-mask
Add a test to check that gradient with no stops are not considered
opaque by gstate (and thus masking with them is not optimized to
paint).
2010-03-31 12:14:25 +02:00
Chris Wilson
473e006ad6 test: Add a1-mask-sample
Test sampling positions with a NEAREST mask.
2010-03-06 18:12:36 +00:00
M Joonas Pihlaja
260d7f8ace test: Test downscaling and extending a surface pattern.
Franz Schmid reported a regression in 1.9.6 when downscaling
and using EXTEND_REPEAT for an image surface pattern.  This
patch adds such tests for every extend mode.
2010-02-27 17:41:28 +02:00
M Joonas Pihlaja
ebadc2ed08 test: Add tests covering more clip fast paths in groups.
The clip-group-shapes-* tests check that it doesn't
matter whether the clip path is set before or after
pushing a group using specific types of clip paths
(aligned/unaligned rectangles and general paths.)
2010-02-27 03:28:59 +02:00
Benjamin Otte
1897156d96 test: Add bug-bo-rectangular
Exercises a bug found in the special case rectangular tessellator with
colinear eo edges.
2010-02-23 08:54:39 +00:00
Chris Wilson
51047483f4 test: Add clip-twice-rectangle
Jeff Muizeelar found another bug with clipping whereby the clip was
been incorrectly discarded.
2010-02-12 12:24:01 +00:00
Chris Wilson
a4793d1331 test: Add linear-gradient-subset
It was observed that we never actually test the condition that the
gradient is only defined for a portion of its range, i.e. the starting
offset is >0 and the ending offset is <0. By definition the colour
between 0 and start offset is the start color, so check that this
behaviour is followed by all backends.
2010-02-07 19:27:32 +00:00
Chris Wilson
2a59220aa4 test: Add linear-step-function
Another bug identified by Jeff Muizelaar was that the bounds for a
zero-length (i.e. it started and stopped at the same point) were
miscomputed. This test case exercises that bug.

Note: I believe the output is wrong here when padding a zero-length
gradient. On the left it should be red, and on the right it should be
blue.
2010-02-02 16:31:36 +00:00
Chris Wilson
7dc464bb2b test: Add clip-empty-save
Jeff Muizelaar found a bug in _cairo_clip_init_copy() which was not
correctly propagating the all-clipped status when an empty clip was
saved in the gstate. This test case exercises that bug.
2010-02-02 16:31:36 +00:00
Benjamin Otte
58980b4ad6 build: Remove glitz surface
glitz is unmaintained and the GL surface is far superior anyway.
2010-01-27 09:56:14 +01:00
Chris Wilson
ca02b51ef6 test: Add an xcb surface source test 2010-01-22 23:01:51 +00:00
Chris Wilson
2edd2adafc test: Exercise scan converters with large rounded rectangles.
Having added a specialised scan converter on the premise that it should
be better at handling rounded rectangles, ensure that they are indeed
rendered correctly.
2010-01-22 23:01:51 +00:00
Chris Wilson
dc8290814c Add subsurface.
A subsurface is a region of another surface that may be used either to
restrict the writable area of a context or the readable extents of a
source. Whilst writing, access to the exterior of the subsurface is
prevented via clipping and when used as a source reads from the exterior
of the subsurface are governed via the extend mechanism of the pattern.
2010-01-22 23:01:50 +00:00
Benjamin Otte
3e17c559b0 [test] Add pthread-same-source test
Multiple threads render using the same source surface, but with
different extend and filter.
2010-01-22 23:01:49 +00:00
Benjamin Otte
30a12f802f [test] Add a simple multithreading test 2010-01-22 23:01:49 +00:00
Benjamin Otte
038829eb84 [test] Add new test checking is_clear is handled properly
This test does various operations with a clear source surface with
various content types.
The idea is to make sure optimizations done when surface->is_clear ==
TRUE only happen in the proper cases.
2010-01-22 23:01:49 +00:00
Chris Wilson
f40560a9bb test: Add linear-uniform
Jeff reported a regression found by Mozilla whereby a uniform gradient
was not being premultiplied on conversion to a solid pattern.

  https://bugzilla.mozilla.org/show_bug.cgi?id=539165
  [Bug 539165] gradients with a single stop do not have their color
               multiplied by the alpha.
2010-01-15 12:25:53 +00:00
Chris Wilson
e22c02dbae test: Add degenerate-arcs
A simple test to ensure that using degenerate-arcs such as when drawing
a rounded rectangle with radii=0 construct a proper path.
2010-01-15 12:25:53 +00:00
Chris Wilson
a5dd5a6069 test: Add path-stroke-twice
Exercises a bug found by alois@astro.ch, whereby we inadvertently remove
a line segment when the path doubles back upon itself.

  Bug 26010 - cairo_line_to optimizes away path segments
  http://bugs.freedesktop.org/show_bug.cgi?id=26010
2010-01-12 17:07:28 +00:00
Benjamin Otte
0d8a04ef47 test: Add cases to exercise clipping after no-ops
Whilst investigating:

  Bug 31788: SVG <line> with y1 == y2 and both with fractional
             part don't render
  https://bugs.webkit.org/show_bug.cgi?id=31788

I found that it can be reduced to a no-op clip following a no-op stroke
or fill. These conditions are exercised here and are shown to be a bug
introduced in the 1.9.x development series.
2009-11-25 10:53:39 +00:00
Andrea Canciani
b1a7639465 Add dash-offset test
Stroking a dash pattern of odd length with a negative offset is broken
(except when the pattern is composed by a single dash).
2009-11-11 16:38:29 +01:00
Andrea Canciani
c181f9e9ae Add new operator-alpha-alpha test
Compositing of alpha-only sources is not throughly tested and
as a consequence the misbehaviour of some backends is not
shown by the test suite.

[ickle: Added XFAILs for pdf, ps, svg.]
2009-11-09 16:58:06 +00:00
Benjamin Otte
84bbf179c3 [test] Add a test exposing bugs in XRenderComposite
This test fills a slightly rotated surface slightly above the 0 line.
This hits some corner cases in the XRenderComposite path.
I discovered these issues while playing with video rendering onto the
canvas in HTML5 (both Webkit and Mozilla have this problem).
I used CAIRO_ANTIALIAS_NONE and a single-color source in the test to get
rid of aliasing issues in the output images. This makes some issues
slightly less visible, but still fails for all of them. If you want to
get a clearer view, disable it and use romedalen.png instead - it has
the same size as the red surface.

(At least) 3 bugs are at work here:
- if _line_exceeds_16_16() triggers for the reference point, the
  source surface will be misaligned.
- the intel driver seems to have an off-by-one bug on my i945 when
  positioning the source surface, causing black seams at the top
  (not visible in the test unless using romedalen.png) and on the left
  of the image.
- My Xvfb fails completely in picture up/download in the xlib-fallback
  path.
2009-11-04 11:20:04 +01:00
M Joonas Pihlaja
43a775f60d [meta] Rename cairo_meta_surface_t to cairo_recording_surface_t.
The new name is more descriptive than the rather opaque meta surface.
Discussed with vigour on the mailing list and #cairo:

http://lists.cairographics.org/archives/cairo/2009-July/017571.html
2009-10-22 02:29:47 +03:00
Andrea Canciani
cef8194178 [test] Add surface-pattern-operator
Test the results of compositing ALPHA and COLOR_ALPHA surfaces
with different operators.
2009-10-20 14:57:41 +01:00
Chris Wilson
96117c1212 [test] Add radial-gradient-source
ranma42 found a bug in compositing with a radial gradient using the
SOURCE operator with EXTEND_NONE, as exercised here.
2009-10-17 10:37:38 +01:00
Benjamin Otte
ade55037ff [test] Add clip-device-offset
Exercises a bug demonstrated by WebKit with clipping + device offsets.
2009-10-15 14:08:01 +01:00
Adrian Johnson
120247ac55 Add EPS test
This test demonstrates a regression in the EPS output since 1.8.8.
The ps-eps.ref.eps was created with 1.8.8.
2009-09-24 23:29:21 +09:30
Chris Wilson
941d3693fa [test] Exercise push-group-color.
Hunting for a known bug in the xlib backend where it invalidly converts
an argb32 source to rgb24. However, this does not appear to be that bug,
but still a useful exercise nevertheless.
2009-09-22 15:46:56 +01:00
Chris Wilson
c61480a319 [test] An oversized twin test case.
A larger variant of the twin mixed antialiasing test.
2009-09-09 11:08:17 +01:00
Chris Wilson
610b311a97 [test] Variation of twin that intermixes antialiasing
Check that we are substituting the right glyph depth and changing masks
appropriately.
2009-09-09 09:53:45 +01:00
Chris Wilson
c218ff8cbe [test] SUBPIXEL_ANTIALIAS varation of twin
Force argb32 glyphs.
2009-09-09 09:53:25 +01:00