[cairo] [PATCH] Allow cairo-xlib-surface.c to compile on older systems.

Chris Wilson chris at chris-wilson.co.uk
Wed Aug 12 00:23:32 PDT 2009


On Tue, 2009-08-11 at 22:22 -0500, Damian Frank wrote:
> Recent changes caused _cairo_xlib_surface_acquire_pattern_surface
> to depend on gradient-related definitions in libXrender's
> headers.  Unfortunately, those definitions are of recent vintage,
> so this breaks compiling on distributions with older libXrender
> versions.  This patch ensures that, if those definitions are
> absent, the code that uses them isn't compiled; instead, a
> fallback is used.

We have a private copy of Xrender.h in cairo-xlib-xrender-private.h that
is meant to hide the details of what is absent from the main body of the
code. I'd prefer a solution that kept the ifdefs out of
cairo-xlib-surface.c, so I'd imagine that it'll take a bit of work to
conditionally consume a few more Xrender stubs and ensure that
buggy_gradients is defined if the headers are too old as well.
Thanks,
-ickle



More information about the cairo mailing list