void _cairo_xcb_connection_shm_detach (cairo_xcb_connection_t *connection, uint32_t segment) { struct { uint8_t req; uint8_t shm_req; uint16_t length; uint32_t segment; } req; struct iovec vec[1]; COMPILE_TIME_ASSERT (sizeof (req) == 8); req.req = connection->shm->major_opcode; req.shm_req = 2; req.length = sizeof (req) >> 2; req.segment = segment; vec[0].iov_base = &req; vec[0].iov_len = sizeof (req); _cairo_xcb_connection_write (connection, vec, 1); _cairo_xcb_connection_put_xid (connection, segment); }
void _cairo_xcb_connection_free_gc (cairo_xcb_connection_t *connection, xcb_gcontext_t gc) { xcb_free_gc (connection->xcb_connection, gc); _cairo_xcb_connection_put_xid (connection, gc); }
void _cairo_xcb_connection_free_pixmap (cairo_xcb_connection_t *connection, xcb_pixmap_t pixmap) { xcb_free_pixmap (connection->xcb_connection, pixmap); _cairo_xcb_connection_put_xid (connection, pixmap); }
void _cairo_xcb_connection_shm_detach (cairo_xcb_connection_t *connection, uint32_t segment) { assert (connection->flags & CAIRO_XCB_HAS_SHM); xcb_shm_detach (connection->xcb_connection, segment); _cairo_xcb_connection_put_xid (connection, segment); }