summaryrefslogtreecommitdiff
path: root/src/cairo-xlib-display.c
diff options
context:
space:
mode:
authorThomas Jaeger <ThJaeger@gmail.com>2009-02-19 12:02:41 -0500
committerChris Wilson <chris@chris-wilson.co.uk>2009-06-05 17:26:09 +0100
commita1d0a06b6275cac3974be84919993e187394fe43 (patch)
treeb5d1d034388f807c6d2208ff08063410caef82d1 /src/cairo-xlib-display.c
parent60aefd0d634c531353c92b77b36424b142efeb93 (diff)
xlib, xcb: Hand off EXTEND_PAD/EXTEND_REFLECT to Render
Most drivers and the X server used to have incorrect RepeatPad/RepeatReflect implementations, forcing cairo to fall back to client-side software rendering, which is painfully slow due to pixmaps being transfered over the wire. These issues are mostly fixed in the drivers (with the exception of radeonhd, whose developers didn't respond) and the RepeatPad software fallback is implemented correctly as of pixman-0.15.0, so this patch will hand off composite operations with EXTEND_PAD/EXTEND_REFLECT source patterns to XRender. There is no way to detect whether the X server or the drivers use a broken Render implementation, we make a guess based on the server version: It's probably safe to assume that 1.7 X servers will use fixed drivers and a recent enough version of pixman.
Diffstat (limited to 'src/cairo-xlib-display.c')
-rw-r--r--src/cairo-xlib-display.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c
index af244abe..65df2b71 100644
--- a/src/cairo-xlib-display.c
+++ b/src/cairo-xlib-display.c
@@ -285,6 +285,7 @@ _cairo_xlib_display_get (Display *dpy,
sizeof (display->cached_xrender_formats));
display->buggy_repeat = FALSE;
+ display->buggy_pad_reflect = TRUE;
/* This buggy_repeat condition is very complicated because there
* are multiple X server code bases (with multiple versioning
@@ -331,13 +332,19 @@ _cairo_xlib_display_get (Display *dpy,
* (just using VendorRelase < 70000000), as buggy_repeat=TRUE.
*/
if (strstr (ServerVendor (dpy), "X.Org") != NULL) {
- if (VendorRelease (dpy) >= 60700000 && VendorRelease (dpy) < 70000000)
- display->buggy_repeat = TRUE;
- if (VendorRelease (dpy) < 10400000)
- display->buggy_repeat = TRUE;
+ if (VendorRelease (dpy) >= 60700000) {
+ if (VendorRelease (dpy) < 70000000)
+ display->buggy_repeat = TRUE;
+ } else {
+ if (VendorRelease (dpy) < 10400000)
+ display->buggy_repeat = TRUE;
+ if (VendorRelease (dpy) >= 10699000)
+ display->buggy_pad_reflect = FALSE;
+ }
} else if (strstr (ServerVendor (dpy), "XFree86") != NULL) {
if (VendorRelease (dpy) <= 40500000)
display->buggy_repeat = TRUE;
+
}
display->next = _cairo_xlib_display_list;