summaryrefslogtreecommitdiff
path: root/src/cairo-xlib-surface-private.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-07-31 13:17:24 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-07-31 14:33:01 +0100
commit786d1f962a7e7ee7036ea85d4ea3aec7580e25db (patch)
tree2ac2aeec0eedbc256fbf28648aac0663a3ff39a6 /src/cairo-xlib-surface-private.h
parent53cbbad8fbbd2b9423a5eb179d0cec3fc7678791 (diff)
downloadcairo-786d1f962a7e7ee7036ea85d4ea3aec7580e25db.tar.gz
[xlib] Use server-side gradients.
We can offload creation of gradients to server that support RENDER 0.10 and later. This greatly reduces the amount of traffic we need to send over our display connection as the gradient patterns are much smaller than the full image. Even if the server fallbacks to using pixman, performance should be improved by the reduced transport overhead. Furthermore this is a requisite to enable hardware accelerated gradients with the xlib backend. Running cairo-perf-trace on tiny, Celeron/i915: before: firefox-20090601 211.585 after: firefox-20090601 270.939 and on tiger, CoreDuo/nvidia: before: firefox-20090601 70.143 after: firefox-20090601 87.326 where linear gradients are used extensively throughout the GTK+ theme. Not quite the result I was expecting! In particular, looking at tiny: xlib-rgba paint-with-alpha_linear-rgba_over-512 47.11 (47.16 0.05%) -> 123.42 (123.72 0.13%): 2.62x slowdown █▋ xlib-rgba paint-with-alpha_linear3-rgba_over-512 47.27 (47.32 0.04%) -> 123.78 (124.04 0.13%): 2.62x slowdown █▋ xlib-rgba paint-with-alpha_linear-rgb_over-512 47.19 (47.21 0.02%) -> 123.37 (123.70 0.13%): 2.61x slowdown █▋ xlib-rgba paint-with-alpha_linear3-rgb_over-512 47.30 (47.31 0.04%) -> 123.52 (123.62 0.09%): 2.61x slowdown █▋ xlib-rgba paint_linear3-rgb_over-512 47.29 (47.32 0.05%) -> 118.95 (119.60 0.29%): 2.52x slowdown █▌ xlib-rgba paint_linear-rgba_over-512 47.14 (47.17 0.06%) -> 116.76 (117.06 0.16%): 2.48x slowdown █▌ xlib-rgba paint_linear3-rgba_over-512 47.32 (47.34 0.04%) -> 116.85 (116.98 0.05%): 2.47x slowdown █▌ xlib-rgba paint_linear-rgb_over-512 47.15 (47.19 0.03%) -> 114.08 (114.55 0.20%): 2.42x slowdown █▍ xlib-rgba paint-with-alpha_radial-rgb_over-512 117.25 (119.43 1.21%) -> 194.36 (194.73 0.09%): 1.66x slowdown ▋ xlib-rgba paint-with-alpha_radial-rgba_over-512 117.22 (117.26 0.02%) -> 193.81 (194.17 0.11%): 1.65x slowdown ▋ xlib-rgba paint_radial-rgba_over-512 117.23 (117.26 0.02%) -> 186.35 (186.41 0.03%): 1.59x slowdown ▋ xlib-rgba paint_radial-rgb_over-512 117.23 (117.27 0.02%) -> 184.14 (184.62 1.51%): 1.57x slowdown ▋ Before 1.10, we may choose to disable server-side gradients for the current crop of Xorg servers, similar to the extended repeat modes. [Updated by Chris Wilson. All bugs are his.]
Diffstat (limited to 'src/cairo-xlib-surface-private.h')
-rw-r--r--src/cairo-xlib-surface-private.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cairo-xlib-surface-private.h b/src/cairo-xlib-surface-private.h
index 53701e249..d963cd6a5 100644
--- a/src/cairo-xlib-surface-private.h
+++ b/src/cairo-xlib-surface-private.h
@@ -75,8 +75,9 @@ struct _cairo_xlib_surface {
* Both are fixed in xorg >= 6.9 and hopefully in > 6.8.2, so
* we can reuse the test for now.
*/
- cairo_bool_t buggy_repeat;
- cairo_bool_t buggy_pad_reflect;
+ unsigned int buggy_gradients : 1;
+ unsigned int buggy_pad_reflect : 1;
+ unsigned int buggy_repeat : 1;
int width;
int height;