summaryrefslogtreecommitdiff
path: root/src/cairo-xlib-display.c
diff options
context:
space:
mode:
authorDamian Frank <damianf@ubuntu-vm.(none)>2009-08-14 11:35:55 -0500
committerChris Wilson <chris@chris-wilson.co.uk>2009-08-29 17:10:05 +0100
commit06ca0b1475caf709fdf32b10a891dfb3b47cc6b1 (patch)
tree0e160a01520411e1590f18485d7f9331513e3219 /src/cairo-xlib-display.c
parent17ef949b6aaa812dd566f1db016055f8e1913320 (diff)
downloadcairo-06ca0b1475caf709fdf32b10a891dfb3b47cc6b1.tar.gz
Fix build on systems with older Xrender headers.
This patch revises xlib so that it doesn't depend on having recent Xrender headers to build. In particular, some definitions were added to the private xrender header file, and an ifdef render version check CAIRO_SURFACE_RENDER_SUPPORTS_OPERATOR was changed to a run-time check using CAIRO_SURFACE_RENDER_HAS_PDF_OPERATORS.
Diffstat (limited to 'src/cairo-xlib-display.c')
-rw-r--r--src/cairo-xlib-display.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c
index 880ac9303..d05bfedd7 100644
--- a/src/cairo-xlib-display.c
+++ b/src/cairo-xlib-display.c
@@ -284,7 +284,14 @@ _cairo_xlib_display_get (Display *dpy,
memset (display->cached_xrender_formats, 0,
sizeof (display->cached_xrender_formats));
+ /* Prior to Render 0.10, there is no protocol support for gradients and
+ * we call function stubs instead, which would silently consume the drawing.
+ */
+#if RENDER_MAJOR == 0 && RENDER_MINOR < 10
+ display->buggy_gradients = TRUE;
+#else
display->buggy_gradients = FALSE;
+#endif
display->buggy_pad_reflect = TRUE;
display->buggy_repeat = FALSE;