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>
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>
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>
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>
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
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>
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>
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>
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>
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>
_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>
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>
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.
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>
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>
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>