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.
In _cairo_surface_mask() there was an invaild optimization (it failed
for surfaces without alpha content). Using _cairo_pattern_is_clear()
is the correct way to evaluate if a pattern is clear.
Fixes clear-source
Andrea found and fixed (and updated all the traces!) an endian bug where
we were encoding a 32bit length inside the compressed string stream.
However, this one inside the script backed escaped his notice.
The OIL routines don't work as expected on MacOS X. The operating
system gives access to the timestamp counter through the function
mach_absolute_time.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
The script interpreter was reading the length of compressed data as
an host-endian uint32_t, thus making cairo-script able to correctly
read traces that were produced on the same endianness as the one they
ran upon, but unsuitable for portabile cairo-scripts.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Trace files were using host-endian to represent the length of
compressed data, making the trace format not portable.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
_gradient_is_opaque() previously returned TRUE for gradient with
no stops, triggering a false optimization in _cairo_gstate_mask().
Fixes test/gradient-zero-stops-mask
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
By tracking which fields of information are already available on the
scaled_glyph we can more efficiently determine if we already have the
requested fields. This reduces from about 6 conditionals to one, and
reduces the function overhead by ~20% -- which has a measurable
improvement on glyph benchmarks.
Provide a hook for the test to be able to compute the number of ops per
second. For instance, the glyphs test uses it to report the number of
kiloglyph per second Cairo is able to render.