diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-06-21 10:08:21 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-06-21 10:13:31 +0100 |
commit | d0c1c9282164bffb76f7419873e93608dc6d9876 (patch) | |
tree | 98d47720e0ebac4eed1352d4ff0ffe97a2e0075b /boilerplate/cairo-boilerplate.c | |
parent | d2244053dcca687a878b1008e3a8219f11d7bd0d (diff) | |
download | cairo-d0c1c9282164bffb76f7419873e93608dc6d9876.tar.gz |
[boilerplate] Implement a reference xlib surface
Create an xlib target that uses a separate display, specified by
CAIRO_REFERENCE_DISPLAY, that can be used as a reference implementation
for the normal display. So this can be used by cairo-trace-test to create
a reference surface that mimics exactly the true surface, but if it
targets an Xvfb display will be entirely rendered in software. If
CAIRO_REFERENCE_DISPLAY is not set, the reference surface degrades into an
xlib-fallback surface which is a close approximation (but still has
behavioural differences).
Diffstat (limited to 'boilerplate/cairo-boilerplate.c')
-rw-r--r-- | boilerplate/cairo-boilerplate.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c index 50a28f89c..39a1a4a92 100644 --- a/boilerplate/cairo-boilerplate.c +++ b/boilerplate/cairo-boilerplate.c @@ -552,7 +552,7 @@ static const cairo_boilerplate_target_t targets[] = /* Acceleration architectures may make the results differ by a * bit, so we set the error tolerance to 1. */ { - "xlib", "xlib", NULL, "xlib-fallback", + "xlib", "xlib", NULL, "xlib-reference", CAIRO_SURFACE_TYPE_XLIB, CAIRO_CONTENT_COLOR_ALPHA, 1, _cairo_boilerplate_xlib_create_surface, NULL, NULL, @@ -562,7 +562,7 @@ static const cairo_boilerplate_target_t targets[] = _cairo_boilerplate_xlib_synchronize }, { - "xlib", "xlib", NULL, "xlib-fallback", + "xlib", "xlib", NULL, "xlib-reference", CAIRO_SURFACE_TYPE_XLIB, CAIRO_CONTENT_COLOR, 1, _cairo_boilerplate_xlib_create_surface, NULL, NULL, @@ -571,6 +571,16 @@ static const cairo_boilerplate_target_t targets[] = _cairo_boilerplate_xlib_cleanup, _cairo_boilerplate_xlib_synchronize }, + { + "xlib-reference", "xlib", NULL, NULL, + CAIRO_SURFACE_TYPE_XLIB, CAIRO_CONTENT_COLOR, 1, + _cairo_boilerplate_xlib_reference_create_surface, + NULL, NULL, + NULL, /* get_image */ + cairo_surface_write_to_png, + _cairo_boilerplate_xlib_cleanup, + _cairo_boilerplate_xlib_synchronize + }, #endif #if CAIRO_HAS_XLIB_SURFACE /* This is a fallback surface which uses xlib fallbacks instead of |