mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 14:20:11 +01:00
st/egl: Update to the new wl_shm_pool interface
This commit is contained in:
parent
900be21e09
commit
9ba3cecaa0
3 changed files with 10 additions and 3 deletions
|
|
@ -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 *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue