summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-01-29 03:00:46 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-01-29 03:00:46 +0000
commitfd59e6d86a3a1fc6720316f20deb8a0bd6f7b767 (patch)
tree87fe6302b743d3f0b16c69bf405f6e899cc70483
parenta364a106b257c4493ba7b3badacc63599ba6064a (diff)
xlib/shm: Always request a CompletionEvent from ShmPutImage
...and treat is as an expected event for synchronisation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/cairo-xlib-surface-shm.c11
-rw-r--r--src/cairo-xlib-surface.c3
2 files changed, 4 insertions, 10 deletions
diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c
index 9c88cb8d..43cecdf1 100644
--- a/src/cairo-xlib-surface-shm.c
+++ b/src/cairo-xlib-surface-shm.c
@@ -404,11 +404,6 @@ peek_processed (cairo_device_t *device)
return LastKnownRequestProcessed (peek_display(device));
}
-static unsigned next_request (cairo_device_t *device)
-{
- return NextRequest (peek_display (device));
-}
-
static void
_cairo_xlib_display_shm_pool_destroy (cairo_xlib_display_t *display,
cairo_xlib_shm_t *pool)
@@ -1231,10 +1226,10 @@ _cairo_xlib_shm_surface_get_ximage (cairo_surface_t *surface,
void *
_cairo_xlib_shm_surface_get_obdata (cairo_surface_t *surface)
{
- cairo_xlib_shm_surface_t *shm;
+ cairo_xlib_display_t *display = (cairo_xlib_display_t *) surface->device;
+ cairo_xlib_shm_surface_t *shm = (cairo_xlib_shm_surface_t *) surface;
- shm = (cairo_xlib_shm_surface_t *) surface;
- shm->active = next_request (surface->device);
+ display->shm->last_event = shm->active = NextRequest (display->display);
return &shm->info->pool->shm;
}
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index ee69b66f..96ba3ad7 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -1345,8 +1345,7 @@ _cairo_xlib_surface_draw_image (cairo_xlib_surface_t *surface,
if (ximage.obdata)
XShmPutImage (display->display, surface->drawable, gc, &ximage,
- src_x, src_y, dst_x, dst_y, width, height,
- shm_image == NULL);
+ src_x, src_y, dst_x, dst_y, width, height, True);
else
XPutImage (display->display, surface->drawable, gc, &ximage,
src_x, src_y, dst_x, dst_y, width, height);