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>
Having spent the last dev cycle looking at how we could specialize the
compositors for various backends, we once again look for the
commonalities in order to reduce the duplication. In part this is
motivated by the idea that spans is a good interface for both the
existent GL backend and pixman, and so they deserve a dedicated
compositor. xcb/xlib target an identical rendering system and so they
should be using the same compositor, and it should be possible to run
that same compositor locally against pixman to generate reference tests.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
P.S. This brings massive upheaval (read breakage) I've tried delaying in
order to fix as many things as possible but now this one patch does far,
far, far too much. Apologies in advance for breaking your favourite
backend, but trust me in that the end result will be much better. :)
File data used by a shading pattern must reusable since the pattern
may read the file multiple times. As currentfile is not reusable, use
the /ReusableStreamDecode to make it reusable.
Now that _emit_smask() can generate A1 masks, the _emit_imagemask()
code can be removed and emit_smask() used instead. An additional
benefit is stencil masks can be generated from ARGB32 and A8 images as
well as A1 providing that the analysis of the transparency shows that
the image is opaque or has bilevel alpha.