summaryrefslogtreecommitdiff
path: root/src/cairo-xcb-private.h
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2011-09-01 13:34:43 +0200
committerUli Schlachter <psychon@znc.in>2011-09-02 15:21:20 +0200
commit968eb30bba1dc942ccd31e4450fdd3bb74c83cb6 (patch)
tree127a02b29ef399f4a33dafd6fb2a5d773c80608e /src/cairo-xcb-private.h
parentea5255653176dfab0fdfe78a3186587b01559735 (diff)
downloadcairo-968eb30bba1dc942ccd31e4450fdd3bb74c83cb6.tar.gz
xcb: Steal from the pending list for GetImage
Before using some piece of SHM again, we must be sure that the X11 server is no longer working with it. For this, we send a GetInputFocus when we are done with the SHM locally and will only use the memory again when the reply comes in. However, if we are allocating the memory for SHM GetImage, then we can re-use memory earlier, because the server processes requests in order. So it will only start writing to the memory after it is done with earlier requests for this memory. So instead of using GetInputFocus for synchronisation, the SHM GetImage request will automatically do this for us. Thanks to Chris Wilson for this idea. Signed-off-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'src/cairo-xcb-private.h')
-rw-r--r--src/cairo-xcb-private.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cairo-xcb-private.h b/src/cairo-xcb-private.h
index c99f1177b..e87f0e88c 100644
--- a/src/cairo-xcb-private.h
+++ b/src/cairo-xcb-private.h
@@ -77,6 +77,7 @@ struct _cairo_xcb_shm_info {
cairo_xcb_connection_t *connection;
uint32_t shm;
uint32_t offset;
+ size_t size;
void *mem;
cairo_xcb_shm_mem_pool_t *pool;
xcb_get_input_focus_cookie_t sync;
@@ -307,6 +308,7 @@ _cairo_xcb_connection_destroy (cairo_xcb_connection_t *connection)
cairo_private cairo_int_status_t
_cairo_xcb_connection_allocate_shm_info (cairo_xcb_connection_t *display,
size_t size,
+ cairo_bool_t might_reuse,
cairo_xcb_shm_info_t **shm_info_out);
cairo_private void