Instead of allocating a depth/stencil buffer for all surfaces, share a
common buffer that's the size of the largest surface. This reduces
video memory usage when there are many GL surfaces.
This is important because there are places in the code where msaa_active
is used to decide whether or not to complete an operation with
multisampling or not.
As the random selection of a gradient can possible destroy the currently
active gradient, we need to flush the context in order to flush any
references to the texture before deletion.
Instead of asserting that the caller passed in a chunk-aligned base
pointer, just perform the fixup whilst initialising the mempool. This
means that the caller (xcb!) cannot assume that the mempool->base is
then the same base pointer as passed in and so needs to store it
separately for use in computing SHM offsets.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The idiom (and expectation) for surface operators is that it leaves the
surface on the stack for the next operation. Also we need to hold onto a
surface reference for objects put onto the stack, yet for the
map-to-image return we did not own one.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Adjust the stack manipulation to avoid moving an unknown surface to
the dictionary.
Reported-by: Dongyeon Kim <dy5.kim@samsung.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
I have noticed that some of my objects were lost when drawing them on
a recording surface and playing them back. Later elements with the same
extents as a prior one tend to disappear from the chain of headers
having similar extents. After doing some debugging, I found that they
are not properly added to the bbtree during playback, and were instead
clobbering the existing chain.
Fixes stroke-clipped, within reason. There still remains some
antialiasing noise (between rendering the circle piecewise and wholly)
worth investigating - but that is probably an artefact of switching
between analytical rendering modes in the scanline
rasterisation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
From commit d7f5a1bec4
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Wed Oct 31 09:27:52 2012 +0000
pen: First check whether the in/out edges lie within the single pen vertex
makes a couple of tests much happier.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Henry Song found that the 256k buffers were disadvantageous on his
embedded hardware. As there is no obvious right value for the default
VBO size, we can tune for the more obvious constraints.
Based on a patch by Henry Song <henry.song@samsung.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Even for bounded masks, we may fail to perform the clipping
geometrically for a variety of reasons, the prime one being that the
clip has a mixture of antialias settings. So when compositing the
polygon, we need to check whether a clip path still remains and so
requires a clipmask.
Fixes regression from
commit cd1004ce19
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri May 11 21:20:35 2012 +0100
traps,spans-compositor: Avoid mistreating unaligned clips as aligned
and
commit 4ea3ace6c8
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri May 11 21:51:44 2012 +0100
spans: Only fallback for a clipmask if unbounded
Reported-by: Dominik Röttsches <dominik.rottsches@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56574
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In particular note that _cairo_xlib_surface_put_shm is indeed called and
is expected to be a no-op when shm is not available.
Reported-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In order to prevent underflow when searching for the closing pen vertex,
we first need to be sure that it does not simply lie next to the opening
pen vertex. As a result we were missing many cases that should have been
a bevel (in == out) and generating almost complete round caps instead.
Reported-by: Dominik Röttsches <dominik.rottsches@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56432
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
So that we can specify the entire source surface as the region to copy
and not introduce clipping errors.
Fixes regression from
commit c068691ff5
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri Aug 17 21:33:54 2012 +0100
xlib/shm: Use an impromptu upload ShmSegment
Reported-by: John Lindgren <john.lindgren@aol.com>
Reported-by: Kalev Lember <kalevlember@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56547
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
- _cairo_type1_font_subset_fini doesn't free font->cleartext
- _cairo_cff_font_create can exit without freeing font->font_name and/or
font->data; _cairo_cff_font_load_opentype_cff is called to allocate
font_name, then _cairo_cff_font_load_cff is called to allocate
font->data, then _cairo_cff_font_load_cff's return status is checked
and if it failed, it jumps to fail1. This can cause font_name to leak
since the fail1 target only frees the font variable. In addition,
_cairo_cff_font_load_cff can fail -after- allocating data, and then
data won't be freed either.
Bug 56566
Before it was known as shmproto.h, the wire protocol definition was to
be found in shmstr.h, so if we don't have the current version of libXext
try to use the older includes.
Reported-by: Sebastian Haas <sehaas@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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>