summaryrefslogtreecommitdiff
path: root/boilerplate
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-04-01 17:09:11 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-05-12 20:54:48 +0100
commitd45c7dc62d6b036bbbe85c3c1951807e055930d9 (patch)
tree1f5961ac769490973048ebf19521371c838258ff /boilerplate
parenta8b611ea8eb90f190ee3a9e7999e08e2d865ac43 (diff)
xcb: discard glyph mask and use dst directly when possible.
Diffstat (limited to 'boilerplate')
-rw-r--r--boilerplate/cairo-boilerplate-xcb.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/boilerplate/cairo-boilerplate-xcb.c b/boilerplate/cairo-boilerplate-xcb.c
index 0a5f5a4f..7f06a4e8 100644
--- a/boilerplate/cairo-boilerplate-xcb.c
+++ b/boilerplate/cairo-boilerplate-xcb.c
@@ -28,6 +28,8 @@
#include <cairo-xcb.h>
+#include <assert.h>
+
static const cairo_user_data_key_t xcb_closure_key;
typedef struct _xcb_target_closure {
@@ -437,8 +439,9 @@ _cairo_boilerplate_xcb_create_render_0_0 (const char *name,
return tmp;
}
- cairo_xcb_device_debug_cap_xrender_version (cairo_surface_get_device (tmp),
- 0, 0);
+ xtc->device = cairo_device_reference (cairo_surface_get_device (tmp));
+ cairo_xcb_device_debug_cap_xrender_version (xtc->device, 0, 0);
+
/* recreate with impaired connection */
surface = cairo_xcb_surface_create_with_xrender_format (c, root,
xtc->drawable,
@@ -447,7 +450,8 @@ _cairo_boilerplate_xcb_create_render_0_0 (const char *name,
free (formats);
cairo_surface_destroy (tmp);
- xtc->device = cairo_device_reference (cairo_surface_get_device (surface));
+ assert (cairo_surface_get_device (surface) == xtc->device);
+
status = cairo_surface_set_user_data (surface, &xcb_closure_key, xtc, NULL);
if (status == CAIRO_STATUS_SUCCESS)
return surface;
@@ -668,7 +672,7 @@ static const cairo_boilerplate_target_t targets[] = {
cairo_surface_write_to_png,
_cairo_boilerplate_xcb_cleanup,
_cairo_boilerplate_xcb_synchronize,
- TRUE, FALSE, FALSE
+ FALSE, FALSE, FALSE
},
{
"xcb-render-0.0", "xlib-fallback", NULL, NULL,