diff options
author | Benjamin Franzke <[email protected]> | 2012-04-03 20:20:49 +0200 |
---|---|---|
committer | Benjamin Franzke <[email protected]> | 2012-04-03 20:28:20 +0200 |
commit | 9ba3cecaa02eba07bc6456c441126e4e2e823da5 (patch) | |
tree | 9da1daab6ff30e1dc79f25ddadefb662004dfb6a | |
parent | 900be21e0943d417a5d149e5b3c2635cb7cc90f9 (diff) |
st/egl: Update to the new wl_shm_pool interface
-rw-r--r-- | src/gallium/state_trackers/egl/wayland/native_shm.c | 11 | ||||
-rw-r--r-- | src/gallium/winsys/sw/wayland/wayland_sw_winsys.c | 1 | ||||
-rw-r--r-- | src/gallium/winsys/sw/wayland/wayland_sw_winsys.h | 1 |
3 files changed, 10 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 diff --git a/src/gallium/winsys/sw/wayland/wayland_sw_winsys.c b/src/gallium/winsys/sw/wayland/wayland_sw_winsys.c index 1a31ada0296..331900e362d 100644 --- a/src/gallium/winsys/sw/wayland/wayland_sw_winsys.c +++ b/src/gallium/winsys/sw/wayland/wayland_sw_winsys.c @@ -243,6 +243,7 @@ wayland_displaytarget_get_handle(struct sw_winsys *ws, whandle->fd = wldt->fd; whandle->stride = wldt->stride; + whandle->size = wldt->size; return TRUE; } diff --git a/src/gallium/winsys/sw/wayland/wayland_sw_winsys.h b/src/gallium/winsys/sw/wayland/wayland_sw_winsys.h index bedd2408f05..c7a0b5c1dde 100644 --- a/src/gallium/winsys/sw/wayland/wayland_sw_winsys.h +++ b/src/gallium/winsys/sw/wayland/wayland_sw_winsys.h @@ -32,6 +32,7 @@ struct wl_display; struct winsys_handle { int fd; unsigned stride; + unsigned size; }; struct sw_winsys * |