Not all version of libXext ship the same set of headers, so play safe
and check during configure that we have the headers we depend upon in
the code.
Reported-by: Sebastian Haas <sehaas@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The PDF at bug 56265 contained a Type 1 font that used the "div"
operator to compute the glyph width. As the "div" operator was
not handled by the charstring parser this resulted in an incorrect
glyph width in the PDF output.
Fix this by upgrading the charstring parsing to handle all Type 1
operators.
Martin Husemann reported that on his NetBSD machine the vendor was being
reported as "The Xorg Foundation", a non-conformist separatist split of
the Peoples' Liberation Army^W^W^W "The X.Org Foundation". Simply check
for both during initialisation.
Reported-by: Martin Husemann <martin@duskware.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Uli Schlachter suggested it would be wiser to complement our blacklist
of known broken X/libXext with an explicit roundtrip to check for a
BadValue error return when we try to use XSendEvent.
Suggested-by: Uli Schlachter <psychon@znc.in>
Reported-by: Martin Husemann <martin@duskware.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
gcc-4.4 and later accept every -Wno option. So we can test for the
option without no in the name to check if the option is supported.
Each time a warning is emitted and without this fix, on gcc-4.4 that will
add this warning:
cc1: warning: unrecognized command line option "-Wno-unused-but-set-variable"
bugs.freedesktop.org #51633, rediffed after 1.12.4
Of course this assumes that all compilers will behave like gcc, which is
reasonably implicit in the set of warning flags.
Signed-off-by: Gilles Espinasse <g.esp@free.fr>
[ickle: slight modification to test both -W and -Wno variants to ideally
preserve compatability with non-GCC compilers sharing GCC options!]
Inside PKG_CHECK_MODULES, AC_MSG_RESULT(no) is already displayed, so the
caller should not use another AC_MSG_RESULT(no).
Add a comment that empty ACTION-IF-NOT-FOUND is not allowed for
PKG_CHECK_MODULES, but a simple : is enough.
This is bugs.freedesktop.org #51628, rediffed after 1.12.4
Signed-off-by: Gilles Espinasse <g.esp@free.fr>
Inkscape is one user who sets geometric tolerance to 1.25 pixels when
stroking sub-pixel lines. Whilst we wait for inkscape to set sensible
values for their tolerance, we have to allow through the current values
in order to prevent the fine strokes from disappearing.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56099
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Whilst reading through other users of XShm, it became apparent that
IPC_RMID behaves differently across the platforms. Linux allows
processes to attach to an existing ShmSegment id after a IPC_RMID, but
for others the IPC_RMID takes immediate effect. On those platforms
without a "deferred" IPC_RMID, we then need to perform the XShmAttach
synchronously before perfomring the IPC_RMID.
Reported-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
According to musl libc author:
"C99 requires the FE_ macros to be defined if and only if the exception they
correspond to is supported"
So we define these macros to 0 if they are not supported. Support for these FPU
exceptions is not necessary for correct functionality, but makes some tests less
effective.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55771
Signed-off-by: Uli Schlachter <psychon@znc.in>
As we may utilize X extensions as we shutdown and release resources
during CloseDisplay, we need to run our own callback first. If we run
last, than we reinstantiate the extensions which often have the
unfortunate habit of then persisting with stale data across the next
Display connection, causing invalid requests to be generated and raise
XErrors.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
As for a native window, the surface does not have an image delegate
itself but instead installs a fallback surface during map_to_image. So
during unmap_image, we then need to unmap from the fallback surface
instead.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The documentation of cairo_surface_create_similar_image() states that the
image's contents are initially all 0. However, the implementation didn't live up
to the documentation.
This was found via the corresponding assert in
cairo_surface_create_similar_image().
There are some cairo-xcb-internal users of this function which cleared the image
right after creating it. Obviously, this isn't needed anymore.
Fixes: Nothing. The existing call in the testsuite to
cairo_surface_create_similar_image() doesn't hit this issue, since it creates a
too small image to hit the SHM-case.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Søren thought it was bit harsh to lay the blame solely on xorg for it
crashing due to an unexpected input value, and that we should mention
libXext was also partly to blame for incorrectly setting the SEND_EVENT
bit in the ShmCompletionEvent.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Søren Sandmann Pedersen pointed out that all versions of Xorg prior to
and including xorg-1.11.0 contained a bug that would cause them to crash
if they ever processed an event sent by XSendEvent. This was fixed in
commit 2d2dce558d24eeea0eb011ec9ebaa6c5c2273c39
Author: Sam Spilsbury <sam.spilsbury@canonical.com>
Date: Wed Sep 14 09:58:34 2011 +0800
Remove the SendEvent bit (0x80) before doing range checks on event type.
so make sure we do not use XSendEvent prior to that commit, which
fortuitously is quite easy as we only do so along the ShmPixmap path.
Reported-by: Søren Sandmann Pedersen <ssp@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In order to avoid recursing upon our source mutex when doing a snapshot,
we can perform an explicit copy of the command array. This should also
be faster than performing a replay as well.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50443
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we generate an edge (through polygon-intersect) where its end-points
lie outside the line definition then it is possible for that line to be
degenerate under sample grid projection. Apply a fudge factor to prevent
explosions as otherwise we reject an edge whose height is not strictly
0.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54822
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Rather than using the traps reference for all target as this then
generates false negatives with the spans compositor.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
So that the composite-rectangles remains consistent with the reduced
clip in case the individual compositors try to optimise their rendering
strategies based on the reduced clip and the overall extents.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we will be reducing the clip intersection to a single clip box check
during construction, it helps if we use the tight clip box.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This problem was introduced in commit "xlib: Implement SHM fallbacks and fast
upload paths". Before, cairo_surface_mark_dirty() directly called
cairo_surface_mark_dirty_rectangle() with special "magical arguments" and thus
didn't need any checks on the surface status.
Fixes: api-special-cases
Signed-off-by: Uli Schlachter <psychon@znc.in>
This code tried to optimize the clip away by intersecting the boxes with the
clip polygon. However, it also did so when the server didn't support traps.
Fixes: clip-stroke-unbounded clip-fill-nz-unbounded clip-fill-eo-unbounded
clip-fill clip-fill-rule a1-clip-fill-rule clip-group-shapes-circles
clip-intersect clip-nesting clip-operator clip-push-group clip-polygons
clip-shape clip-text clip-twice inverted-clip mask random-clip
rotate-clip-image-surface-paint trap-clip unantialiased-shapes
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit adds lots of asserts. These asserts verify for each extension
request that we send that the server really supports this.
Sadly, this causes 28 assertion failures in the test suite with xcb-render-0.0.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit removes the hand-written code in cairo-xcb-surface.c and instead
makes use of cairo_compositor_t. Surprisingly, this doesn't break a single test
case. :-)
Signed-off-by: Uli Schlachter <psychon@znc.in>