Commit graph

9898 commits

Author SHA1 Message Date
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
Adrian Johnson
b13c2270f5 test: refresh pdf mask ref images 2011-09-18 13:32:32 +09:30
Adrian Johnson
a01cc10fe1 pdf: ensure ink extents is not larger than bounded extents
fixes mask test pdf output
2011-09-18 13:32:32 +09:30
Chris Wilson
fc011bfcb9 test: Record the current status of radial-outer-focus as xfail
Debate rages as to the correct way to handle this. In some ways the
current output is expected due to the numerical instability in handling
the inner-focus-on-the-outer-circle. However, the result looks less than
desirable so some solution (which may not be inside cairo per-se) is
sought.
2011-09-17 12:28:33 +01:00
Chris Wilson
cea41a61c1 image: intersect the source extents with the replay extents for EXTEND_NONE
Fixes up the boundary on EXTEND_NONE replays.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-17 12:01:49 +01:00
Chris Wilson
09b42c748e wrapper: intersect with target extents
Treat the target extents as an implicit clip for computing the maximal
operation extents.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-17 12:00:49 +01:00
Chris Wilson
242fbb010e image: Use the recording surface content for the recording source
The previous commit should have been a enormous warning that something
was horribly wrong. I was determined to preserve the optimisation of
replaying onto the matching format, however, we need to provide an alpha
channel if required.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 21:56:52 +01:00
Chris Wilson
ab924b11a8 image: Use A8 for creating a mask from a recording surface
When applying masks, typically it is useful to have an alpha channel.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 19:32:20 +01:00
Chris Wilson
3fde219487 test: Refresh reference images for spans/traps
I found a bug in my SSE2 lerp implementation which resolved quite a few
failures.
2011-09-16 17:44:33 +01:00
Uli Schlachter
84d1eac61f path: Fix a minor oversight in 1ce5d4707c
The plan was "path: Skip calls to zero-length memcpy". However, this skipped
calls if the buffer was still empty, which means that it skipped all calls.

Fixes: Half the test suite, lots of assertion failures

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-16 18:00:21 +02:00
Uli Schlachter
a1be14693b boilerplate-xcb: Print sequence numbers
The boilerplate code will now also print the low 16 bits of the sequence number
for errors and events. This should make it a lot easier to find errors in e.g.
a long xtrace output.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-16 17:45:27 +02:00
Uli Schlachter
7ba28ff563 cairo-xcb: Require libxcb 1.6
Since commit 968eb30bba, we use xcb_discard_reply(). This function was
added in libxcb 1.6.

"Fixes": https://bugs.freedesktop.org/show_bug.cgi?id=40925

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-16 17:45:27 +02:00
Uli Schlachter
b6c3fea672 xcb: Improve error cases in _clip_and_composite_combine
This makes sure that errors from _cairo_clip_get_surface() aren't lost and that
we really got an xcb surface.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-16 17:45:26 +02:00
Chris Wilson
f3a9a0c9e6 test: Add a1-fill
Capture the bug report:
https://bugs.freedesktop.org/show_bug.cgi?id=31604

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 16:25:45 +01:00
Chris Wilson
1ce5d4707c path: Skip calls to zero-length memcpy
We attempt to copy 0 points onto the array of path points for a
close-path. This is pointless and an unnecessary function call under
MSVC at least.

Based on a patch by Steve Snyder, incorporating Behdad's review
comments.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37836
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 16:11:42 +01:00
Krzysztof Kosinski
f09361cff1 test: Add radial-outer-focus
Numerical instability in the computation of gradients leads to random
results.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40918
2011-09-16 16:03:23 +01:00
Chris Wilson
26e8fa03cb base: Make sure we have fuzzy clip boxes!
_cairo_clip_get_surface() expects the caller to handle unaligned clip
boxes in order to avoid recursion. The baseline renderer ignored this
basic tenet and so ended up with only sharp clip regions.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 15:04:14 +01:00
Chris Wilson
c5295981c6 test: Update reference images for test-base
Uli Schlachter spotted that I had create reference images with sharp
edges for his tighten-bounds test case, exactly as if I had ignored
unaligned clip boxes...

Turns out I had removed the code to handle them...
2011-09-16 15:04:14 +01:00
Adrian Johnson
f1c8c00f16 test: refresh some pdf/ps refs 2011-09-16 23:04:53 +09:30
Adrian Johnson
12ee7989a0 test: refresh some pdf/ps refs 2011-09-16 22:52:05 +09:30