From 16626282fdb8f97188caea7ed8705cd66f062a31 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Tue, 3 Apr 2012 11:21:27 -0400 Subject: clients: Use new shm interface --- clients/simple-shm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'clients/simple-shm.c') diff --git a/clients/simple-shm.c b/clients/simple-shm.c index 7026af9..d1fe0c6 100644 --- a/clients/simple-shm.c +++ b/clients/simple-shm.c @@ -57,6 +57,7 @@ create_shm_buffer(struct display *display, int width, int height, uint32_t format, void **data_out) { char filename[] = "/tmp/wayland-shm-XXXXXX"; + struct wl_shm_pool *pool; struct wl_buffer *buffer; int fd, size, stride; void *data; @@ -83,9 +84,10 @@ create_shm_buffer(struct display *display, return NULL; } - buffer = wl_shm_create_buffer(display->shm, fd, - width, height, stride, format); - + pool = wl_shm_create_pool(display->shm, fd, size); + buffer = wl_shm_pool_create_buffer(pool, 0, + width, height, stride, format); + wl_shm_pool_destroy(pool); close(fd); *data_out = data; -- cgit v1.2.3