diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-05-27 15:59:37 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-06-01 16:50:25 +0100 |
commit | 63bdae27a83381fb8c3786c2d7a6c2592e388ee9 (patch) | |
tree | 1897d8eac8bf89bfdc1fb6c99a1ee59b044e5143 /src/cairo-xcb-connection.c | |
parent | e21b373c94b1edb2828d4fee7ff45060fb22dbda (diff) | |
download | cairo-63bdae27a83381fb8c3786c2d7a6c2592e388ee9.tar.gz |
xlib,xcb: Force strict adherence to the Render specification when testing
Introduce cairo_xlib_device_debug_set_precision() to override the
automatic selection of rendering precision and force the Xorg/DDX to
strictly adhere to the precise rendering mode of the Render
specification. This allows us to test drivers without worrying, too
much, about minor discrepancies in antialiasing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-xcb-connection.c')
-rw-r--r-- | src/cairo-xcb-connection.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cairo-xcb-connection.c b/src/cairo-xcb-connection.c index 0c244b1dc..56bf5aef6 100644 --- a/src/cairo-xcb-connection.c +++ b/src/cairo-xcb-connection.c @@ -889,3 +889,23 @@ cairo_xcb_device_debug_cap_xrender_version (cairo_device_t *device, connection->flags &= ~CAIRO_XCB_RENDER_HAS_GRADIENTS; } } + + +void +cairo_xcb_device_debug_set_precision (cairo_device_t *device, + int precision) +{ + if (device->status) + return; + + ((cairo_xcb_connection_t *) device)->force_precision = precision; +} + +int +cairo_xcb_device_debug_get_precision (cairo_device_t *device) +{ + if (device->status) + return -1; + + return ((cairo_xcb_connection_t *) device)->force_precision; +} |