Figuring out where the outer circle should move to is tricky. I hope the
algebra in there is understandable.
This is a nice performance improvement, probably because we avoid painting the
gradient over the entire clipBox (which is usually the entire surface).
I tried to write reftests that compared a repeating radial gradient to a
non-repeating gradient with manually repeated stops, but it didn't work because
the rasterization was slightly different --- I'm not sure why.
This patch also forces us to use pixman for all degenerate cases where the
circles intersect. This at least makes us consistent across platforms.
From https://bugzilla.mozilla.org/show_bug.cgi?id=508227
The non-__GNUC__ version of the container_of macro would do wrong
when used like container_of(...)-> because '->' binds tighter
than the cast in the container_of macro. Adding an additional
set of parantheses fixes this.
When choosing the xcb_screen_t to use for the xlib-xcb backing surface,
it helps if it matches the screen used to generate similar surfaces and
snapshots - otherwise we end up pulling the image back from the XServer
every time we want to use the Picture.
A common operation is to store an image in a similar surface, so
construct a fast path to avoid the allocation and double-blit through a
temporary pixmap.
Set the CAIRO_TEST_FORCE_PASS environment variable to run through the
test suite and ignore errors. Useful for forcing distcheck to continue
past a broken test suite.
Don't scatter calls to error printing around everywhere, instead do it
in the one place where it matters.
Also, convert the functions to macros, so we can use __FILE__ and
__LINE__ when printing a warning
Through a very simple mistake we were triggering fallbacks after
detecting we were not able to perform the composite using GLSL -- we
were just returning the UNSUPPORTED status instead of enabling the
fixed-function path.
The implementation is the same as the atomic one (bar the use of atomic
primitives to manipulate the occupancy!).
Patch based on the original by Jeff Muizelaar.
As the user is likely to attach the underlying resources to the device
for automatic collection upon finalization, it is important that the
user data is then destroy last (so that those resources are still
available in the surface and device cleanup routines).
As we actually use the GLXContext to create the device, we only want to
free those resources upon the final unreference of the device (and not
the initial surface).
Test handling of source clipping with an image - principally to check
handling of mime types and zero-copy image snapshotting in the vector
surfaces and ensure that they work with subsurface patterns as well.
In converting to cairo_list_t, it helps to preserve the semantics of
appending the page to the end of the list where it is expected to be
plucked in the event of an allocation failure.
The function takes a cairo_device_t argument as it can be called on an
unacquired device.
This is the first patch in a process to try to rid cairo-gl-surface.c of
casts from cairo_device_t to cairo_gl_context_t. As its members should
usually only be accessed when the device is locked, the only way the
cairo_gl_context_t should be acquired is using
_cairo_gl_context_acquire().