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>
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.
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>
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>
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>
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...
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>
The test-traps provides a reference implementation of the
traps-compositor as used by xlib, so we can use it to generate the
reference images as well. (Of course checking that test-traps is itself
correct and only differs in the renderer! ;-)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
With over two thousand references images now, it is starting to make the
test directory look cluttered!
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.
test-base basically implements rendering ala cairo-1.0 and so serves as
a useful baseline for comparing enhancements and to regression test the
core libraries.