Commit graph

6230 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
a0ec977944 bentley-ottman: End subsumed colinear traps
I'm not quite sure how we end up with a pair of colinear edges both with
a deferred trap...

Fixes crash in bug-bo-ricotz

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 13:49:24 +01:00
Chris Wilson
35f41d253f fdr,tee: Reorder master/slave invocation to capture death-upon-signals
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 13:48:09 +01:00
Adrian Johnson
d118ae5f64 analysis mask: unwrap recording surface snapshot
fixes mask-alpha test
2011-09-16 20:53:28 +09:30
Chris Wilson
af6ee4e82e image: Invert recording matrix before replay
Hmm, still not quite right but an improvement.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-15 16:57:52 +01:00
Chris Wilson
9bf21c74ae check: Make the newly added privates pass make check
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-15 15:55:52 +01:00
Chris Wilson
d4c59d6a8c build: Another missing private.h 2011-09-15 15:50:29 +01:00
Chris Wilson
ca95e37412 build: Add missing cairo-surface-backend-private.h to sources 2011-09-15 15:35:14 +01:00
Chris Wilson
f2a49e9329 script: Tag the similar surface rather than snapshot
As we discard the snapshot immediately upon drawing to it, it serves no
purpose.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-15 15:29:15 +01:00
Chris Wilson
1b2709d8c0 composite: Reduce an unaligned clip
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-15 15:29:15 +01:00
Uli Schlachter
a349564e3c Revert "xcb: Error on 0x0 source surfaces"
This reverts commit 8f8149a207.
2011-09-15 16:21:42 +02:00
Uli Schlachter
c00e4c6671 Tee: compile fix for recent compositor API
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-15 16:21:41 +02:00
Chris Wilson
088d483043 ps: Check earlier for a supported mask
Fixes crash in fill-and-stroke-alpha.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-15 14:51:11 +01:00
Chris Wilson
13bd9592d8 ps: Fix return value for mask_supported and ps2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-15 14:28:53 +01:00
Chris Wilson
1eaab086f3 ps: Set transparency for stencil_masks
Fixes crash in a8-mask.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-15 13:53:15 +01:00
Adrian Johnson
47e16d0e56 subsetting: Support unicode fontnames
Most fonts use Window platform specific encoded font names since they
allow unicode names.

- Make _cairo_truetype_read_font_name() read the Windows platform
  names first. If this fails, fallback to reading he the Mac platform
  MacRoman encoded name.

- Use the PDF method of encoding non ASCII PS font names. Poppler will
  correctly extract the unicode name.

- Make PDF embed the font family name as AsciiHex if the name is not ASCII.
2011-09-15 22:05:22 +09:30
Chris Wilson
472e4515de image: fix compilation of spans with LERP 2011-09-14 20:21:08 +01:00
Chris Wilson
872e1c87b3 skia: fix compilation 2011-09-14 20:21:03 +01:00
Chris Wilson
cf71821a33 mono: Amalgamate adjacent spans
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-14 19:22:24 +01:00
Chris Wilson
8a80bbf78d image: Adapt to updated pixman lerp operators
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-14 19:10:22 +01:00
Uli Schlachter
e3131242b2 xlib-xcb: Make this compile again
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-14 15:50:19 +02:00
Uli Schlachter
af11d26752 xcb: Remove some dead code
surface->use_pixmap always had the value 0. This code is taken from cairo-xlib.
However, in cairo-xlib use_pixmap is set to 20 if XGetImage() fails.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-14 15:21:37 +02:00
Uli Schlachter
cd69c8ef68 cairo_clip_path_t: Remove extents
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-14 15:21:37 +02:00
Chris Wilson
7cf7ee5e29 traps: Skip compositing an empty bounded regions
Fixes the cairo-xlib crash with tighten-bounds. (I thought I had fixed
it earlier, but I was obviously wrong.)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-14 12:45:59 +01:00
Chris Wilson
3e655f0819 traps: Send unaligned boxes as trapezoids
According to the little fishies this performs significantly better.
As a bonus, it did not handle overlapping boxes correctly...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-13 12:31:14 +01:00
Adrian Johnson
8218f5278e ps: turn off debug 2011-09-13 18:52:50 +09:30
Chris Wilson
4f2c7b8cf8 mono-scan-converter: Decrement height as we skip straight edges
Fixes paint-clip-fill-mono.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-12 15:49:13 +01:00
Adrian Johnson
7b6586a738 scaled-subsets: ensure different glyphs with same utf8 mapping are not merged together
If a glyph maps to a latin char that is already assigned in the latin
subset, put the glyph in a non latin subset.
2011-09-12 22:04:06 +09:30
Adrian Johnson
497258a4cf ft: fix warning 2011-09-12 22:01:09 +09:30
Adrian Johnson
b0d9b4ce53 pdf: add status check 2011-09-12 21:53:59 +09:30