Commit graph

9917 commits

Author SHA1 Message Date
Uli Schlachter
38ce0850b8 test: Add mime-surface-api
This test checks if setting and unsetting mime data works correctly. E.g. this
verifies that we get the same pointer back which we passed in (=no copy made).

This test currently crashes in its last call to cairo_surface_get_mime_data().

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-04 21:00:23 +02:00
Andrea Canciani
8664df767c quartz: Fix the 32-bits build on MacOSX 10.7
FMGetATSFontRefFromFont() is not public on Lion nor on 64-bits
Frameworks, but it seems to be available in the dynamic libs, hence we
can dlsym() it just like other private functions.

Works around the error:
cairo-quartz-font.c: In function 'cairo_quartz_font_face_create_for_atsu_font_id':
cairo-quartz-font.c:830: error: implicit declaration of function 'FMGetATSFontRefFromFont'

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39493
2011-10-01 09:24:08 -07:00
Chris Wilson
80fff70e6c test: Add clip-rectilinear
Exercise the clipping code with a rectilinear path (rather than a set of
boxes as per usual).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-30 16:31:06 +01:00
Chris Wilson
538fa0d6fb fill: Fix unantialiased rectilinear-fill-to-boxes
We were calling the antialias close function from the unantialiased
paths - a function that operates on a completely different structure to
the one passed in.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-30 15:58:14 +01:00
Chris Wilson
719bef0c90 image: Enable use of LERP_SRC for masked source composition
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-30 13:07:23 +01:00
Chris Wilson
2994b0c634 stroke: Use the tessellator to resolve overlapping strokes
If the stroke is too large, the strokes around the box overlap and we
fail to generate the canonical form of the boxes. So if we detect that
the boxes overlap, feed them through the tessellator to reduce them to
canonical form.

Fixes line-width-overlap.

Based on a patch by  Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-29 00:26:06 +01:00
Chris Wilson
30eac7b2c5 test: Add line-width-large-overlap
Exercise the case of stroking a box with a pen wider than the box
itself, a variation on line-width-overlap suggested by Paulo Zanoni.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-29 00:24:18 +01:00
Rob Bradford
82a7eac1de build: Specify the reference images as a directory for EXTRA_DIST
Rather than having the reference images individually listed in
test/Makefile.refs the whole directory can be included in the EXTRA_DIST
block.

This removes the need to have the check-ref-missing Makefile target.
2011-09-27 15:44:57 +01:00
Chris Wilson
add9a4092b trace: Emit an stack operation to create a pattern from an undefined surface
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-27 14:56:55 +01:00
Chris Wilson
b8ae60f619 test: Refresh reference images
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-26 14:55:03 +01:00
Chris Wilson
303893681f test/random-clips: Paint clip to highlight the issues
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-26 13:30:35 +01:00
Chris Wilson
9fe7022790 polygon-intersect: Remove surplus edge direction
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-26 13:25:58 +01:00
Chris Wilson
1a1b39a9c3 script: compile without
The surface observer gained a dependency on script, make it optional.
2011-09-26 11:52:48 +01:00
Chris Wilson
bbacfc4e83 win32: Compile, but broken
First step: just make it compile again but crash upon usage.
2011-09-26 11:52:05 +01:00
Chris Wilson
4790bbf596 boilerplate: Skip testing of null surfaces
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-26 11:51:27 +01:00
Chris Wilson
9c56df3904 test: Mark the record-select-font-face as XFAIL
The recording surface has no knowledge of the target surface when it
generates the scaled font and informs the client about the kerning and
metrics. This results in an unfortunate slight misalignment when
replaying the glyphs against the ideal case.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-23 23:34:29 +01:00
Chris Wilson
70ac21f7bb test: Refresh rotated-clip reference 2011-09-23 23:32:37 +01:00
Chris Wilson
606e9e1c9e test: Refresh tighten-bounds reference image
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-23 23:28:50 +01:00
Chris Wilson
d71ce5e0dd spans: Fix empty polygon unbounded fixup
There is a subtle flaw in the current querying of polygon extents; it
simply returns the limits and not the point extremeties and certainly
not the tessellation extents. Computing that is likely to take long than
rendering the polygon. This does mean that we need to also fixup the
extents prior to performing the empty unbounded fast path.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-23 23:24:25 +01:00
Chris Wilson
9a366cff2c test: Redefine success for miter-precision
On review, that segment does exist and should not have been removed by
numerical errors!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-23 22:48:46 +01:00
Chris Wilson
2c34f028a7 test: Exercise scaling from an atlas through a subsurface
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-23 13:37:51 +01:00
Chris Wilson
9b3b84976a test: refresh text-pattern reference 2011-09-23 13:20:32 +01:00
Chris Wilson
7e5e2dd5e1 test/create-from-png: Update to point to new reference/ images
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-23 13:20:14 +01:00
Uli Schlachter
f162f7ebb4 xcb: Fix device offsets with unmap_image()
The source and target x/y coordinates were swapped. No idea why this only now
caused a test suite failure, perhaps something recently started using SHM?

Fixes: map-bit-to-image, map-to-image-fill

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-22 22:26:09 +02:00
Uli Schlachter
880321ae9d xcb: Fix a "incompatible pointer" compiler warning
cairo-xcb-surface.c:790:2: warning: return from incompatible pointer type

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-22 22:24:58 +02:00
Uli Schlachter
aa16e3e666 xcb: Honor clips for defer clear
This bug was accidentally introduced in fd613cb9f9.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-22 21:18:57 +02:00
Uli Schlachter
87fdc4356f xcb: Don't try to fallback more than once
This fixes the following assert for pretty much every single xcb-fallback test:

cairo-xcb-surface.c:320: _get_image: Assertion `surface->fallback == ((void *)0)' failed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-22 20:46:24 +02:00
Adrian Johnson
d43f6d7459 test: make text-pattern draw with both opaque and translucent patterns
Poppler renders the translucent PDF output of this test correctly with
cairo 1.10.2 but fails with current git.
2011-09-22 23:41:35 +09:30
Adrian Johnson
b30b0c14cb test: Add stroke-pattern
Poppler renders the PDF output of this test correctly with cairo 1.10.2 but fails with current git.

Commenting out the cairo_translate makes the PDF output render correctly with current git.
2011-09-22 22:43:07 +09:30
Chris Wilson
0e95215c01 test/trace: Hack to dump out per-context images and traces
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-21 11:19:04 +01:00
Chris Wilson
f8c4686310 image: don't offset by device transform for replay onto source surface
It is already captured by the pattern extents.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-20 14:34:23 +01:00
Chris Wilson
5f0dcf610f image: clip the replay to the sample extents in device space
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-20 14:05:31 +01:00
Chris Wilson
da95bdfcd7 wrapper: transform the clip into device space
We need more than just mere translation!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-20 14:04:29 +01:00
Adrian Johnson
a810b012cf subsets: latin char map needs to belong to the font, not the subset 2011-09-20 00:03:33 +09:30
Chris Wilson
fd613cb9f9 xcb: track fallback damage
And only upload the parts of the image that are modified during the
fallback. I have to keep reminding myself that the goal is always to
reduce the amount of fallbacks required...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-19 15:23:57 +01:00
Uli Schlachter
36a1423045 xcb: Remove an unused variable
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-18 20:07:35 +02:00
Uli Schlachter
cdd75ec407 xcb: Use a mask in _composite_boxes() when needed
This doesn't just need a clip without any path, it also needs pixel aligned
boxes.

This improves the result for unaligned boxes in tighten-bounds.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-18 20:07:35 +02:00
Uli Schlachter
e580565e28 xcb: Stop using _cairo_clip_get_surface()
This function changed its behavior and no longer does what we want. Instead,
this now uses its own function which uses _cairo_clip_combine_with_surface().

This fixes crashes in the tighten-bounds and random-clip tests. These happened
because cairo-xcb was trying to be clever. ;-)

Since _cairo_clip_get_surface() did less, the resulting surface had
deferred_clear == true and picture == XCB_NONE. The code then tried using this
evil picture and either ran into an assert() or caused a BadPicture error.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-18 20:07:35 +02:00
Uli Schlachter
6fb4c3ae35 _cairo_clip_get_surface(): Don't lose errors
If one of the _cairo_surface_fill() calls failed, this function would stop and
return an intermediate result, thus hiding the error that happened.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-18 20:07:35 +02:00
Andrea Canciani
74e7f3b441 quartz-font: Fix scaled font backend hooks
In af9fbd176b the show_glyphs hook has
been removed from cairo_scaled_backend_t, but quartz-font was not
updated.

Fixes:

cairo-quartz-font.c:798: warning: initialization from incompatible pointer type
2011-09-18 09:13:17 -07:00
Andrea Canciani
f8e4657d8a Make cairo-missing a static library
It was meant to be static, but my autotools-fu was not good enough.
2011-09-18 09:01:07 -07:00
Andrea Canciani
7827f46d7c quartz: Fix build
Fix a bunch of typos and "wrong number of arguments" errors.
Clean up some "unused variable" errors.
2011-09-18 08:48:05 -07:00
Chris Wilson
1b40304087 traps: use the customised _cairo_clip_get_surface
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-18 09:28:17 +01:00
Chris Wilson
2209ec5a15 test: Make cairo_test_suite depend upon the any2ppm exectuable on all platforms
On some platforms, executables have an extension which confuses
automake into building an entirely different binary.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-18 08:52:46 +01:00
Dave Yeo
a7b2c28adf On OS/2, WIFSIGNALED and WTERMSIG are prototyped in sys/wait.h
boilerplate/cairo-boilerplate-pdf.c |    4 ++++
 boilerplate/cairo-boilerplate-ps.c  |    4 ++++
 boilerplate/cairo-boilerplate-svg.c |    4 ++++
 build/configure.ac.system           |    2 +-
 4 files changed, 13 insertions(+), 1 deletions(-)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-18 08:50:26 +01:00
Dave Yeo
fdd54d2b79 Fix the number of parameters for cairo_os2_surface_set_size()
test/error-setters.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-18 08:50:00 +01:00
Dave Yeo
222f0846e6 os2-surface needs to include cairo-image-surface-private.h
src/cairo-os2-surface.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-18 08:49:38 +01:00
Chris Wilson
59a5c9d34c os2: Blindly update os2 to the new fallback compositor
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-18 08:47:28 +01:00
Chris Wilson
e4ebee1cf4 pdf: Use the helper functions to update the composite rectangles
These functions also know to update the clip and recompute the sample
areas and other derived information.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-18 08:27:06 +01:00
Chris Wilson
6c6bd6fb29 composite-rectangle: Add a helper to refine source extents
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-18 08:27:06 +01:00