diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-04-03 11:21:27 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-04-03 11:22:06 -0400 |
commit | 16626282fdb8f97188caea7ed8705cd66f062a31 (patch) | |
tree | a04c7b2b8077503bce38190aab9fefe23c9eb0c7 /clients/simple-shm.c | |
parent | 919fbf0fee39a5e0636569bfbca9e45af790332d (diff) |
clients: Use new shm interface
Diffstat (limited to 'clients/simple-shm.c')
-rw-r--r-- | clients/simple-shm.c | 8 |
1 files changed, 5 insertions, 3 deletions
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; |