Commit 9ba3ceca authored by Benjamin Franzke's avatar Benjamin Franzke 😀
Browse files

st/egl: Update to the new wl_shm_pool interface

parent 900be21e
......@@ -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
......
......@@ -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;
}
......
......@@ -32,6 +32,7 @@ struct wl_display;
struct winsys_handle {
int fd;
unsigned stride;
unsigned size;
};
struct sw_winsys *
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment