Do not call the destroy function directly, but rely on the reference
counting to call the notifier upon the last reference. Instead, simply
release the reference we were holding for the cache and CloseDisplay
callback.
Now with the concept of a cairo_device_t and the ability to flush it,
we now longer require the heuristic of automatically flushing on behalf
of the user at the end of every context.
The code now uses the locking of the cairo_device_t instead of its own
mutexes.
The code was modified so that cairo_surface_t does no longer reference
the display directly. Instead, it calls _cairo_xlib_display_acquire().
If a function assumes an already acquired display, it now requires the
caller to provide a cairo_xlib_display_t parameter. Functions that do
not require an acquired display will not require the display parameter
or they will take the cairo_device_t instead.
The code callss the gl device's acquire/release in
cairo_device_acquire/release(). This way, external APIs can use these
functions to prepare for rendering GL.
Also adds code to unset the glx context if it wasn't set when acquiring
the device. This allows multithreaded apps to work fine with just using
cairo APIs, but might introduce penalties in single-threaded
applications.
A simple extension to the component-alpha OVER [as ca-ADD is just the
second pass in ca-OVER] to support amalgamation of glyph masks. This
speeds up firefox-36 by ~5% on g45.
Before:
firefox-36-20090611 76.185
After:
firefox-36-20090611 72.863
If the surface is in error, the appropriate action is report the error
using an inert error cairo_device_t.
Reported-by: Benjamin Otte <otte@redhat.com>
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=599574
The backend API manipulated the surface prior to checking whether it was
an inert error surface - and in the event of an error surface, tried to
overwrite it's error status.
Andreas Falkenhahn reported a bizarre situation with some
implementations of qsort that actually compare the same elements and
require the comparator to return 0. So be it.
Reported-by: Andreas Falkenhahn <andreas@airsoftsoftwair.de>
There is no need to shrink the cache if we add an entry of size 0, so
don't by moving the guards in _cairo_cache_shrink_to_accommodate() to the
callers.
cairo_boilerplate_xlib_surface_disable_render() is not defined when
compiling without XRender, but it was used nonetheless. Replace it
with an empty stub when XRender is not available.
This should exercise a bug found by Jeff Muizelaar that
cairo-surface-clipper was mistakenly thinking that clip operations on a
second context was a no-op as the topmost clip path matched that of the
previous context.