summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorBenjamin Franzke <[email protected]>2012-04-03 20:20:49 +0200
committerBenjamin Franzke <[email protected]>2012-04-03 20:28:20 +0200
commit9ba3cecaa02eba07bc6456c441126e4e2e823da5 (patch)
tree9da1daab6ff30e1dc79f25ddadefb662004dfb6a /src/gallium/state_trackers
parent900be21e0943d417a5d149e5b3c2635cb7cc90f9 (diff)
st/egl: Update to the new wl_shm_pool interface
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/egl/wayland/native_shm.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/egl/wayland/native_shm.c b/src/gallium/state_trackers/egl/wayland/native_shm.c
index c2375788aac..574ffce4b66 100644
--- a/src/gallium/state_trackers/egl/wayland/native_shm.c
+++ b/src/gallium/state_trackers/egl/wayland/native_shm.c
@@ -84,6 +84,8 @@ wayland_create_shm_buffer(struct wayland_display *display,
struct winsys_handle wsh;
uint width, height;
enum wl_shm_format format;
+ struct wl_buffer *buffer;
+ struct wl_shm_pool *pool;
resource = resource_surface_get_single_resource(surface->rsurf, attachment);
resource_surface_get_size(surface->rsurf, &width, &height);
@@ -104,9 +106,12 @@ wayland_create_shm_buffer(struct wayland_display *display,
break;
}
- return wl_shm_create_buffer(shmdpy->wl_shm, wsh.fd,
- width, height,
- wsh.stride, format);
+ pool = wl_shm_create_pool(shmdpy->wl_shm, wsh.fd, wsh.size);
+ buffer = wl_shm_pool_create_buffer(pool, 0, width, height,
+ wsh.stride, format);
+ wl_shm_pool_destroy(pool);
+
+ return buffer;
}
static void