mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 04:40:07 +01:00
shared/client-buffer-util: Add buffer type enum
This will be helpful in follow-up commits. Signed-off-by: Robert Mader <robert.mader@collabora.com>
This commit is contained in:
parent
618bfad1d4
commit
e27929e3b3
2 changed files with 8 additions and 0 deletions
|
|
@ -231,6 +231,7 @@ client_buffer_util_create_shm_buffer(struct wl_shm *shm,
|
|||
|
||||
buf = xzalloc(sizeof *buf);
|
||||
buf->fmt = fmt;
|
||||
buf->type = CLIENT_BUFFER_TYPE_SHM;
|
||||
buf->width = width;
|
||||
buf->height = height;
|
||||
|
||||
|
|
@ -321,6 +322,7 @@ client_buffer_util_create_dmabuf_buffer(struct wl_display *display,
|
|||
|
||||
buf = xzalloc(sizeof *buf);
|
||||
buf->fmt = fmt;
|
||||
buf->type = CLIENT_BUFFER_TYPE_DMABUF;
|
||||
buf->width = width;
|
||||
buf->height = height;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,8 +37,14 @@ struct zwp_linux_dmabuf_v1;
|
|||
|
||||
#define MAX_DMABUF_PLANES 4
|
||||
|
||||
enum client_buffer_type {
|
||||
CLIENT_BUFFER_TYPE_SHM = 1,
|
||||
CLIENT_BUFFER_TYPE_DMABUF,
|
||||
};
|
||||
|
||||
struct client_buffer {
|
||||
const struct pixel_format_info *fmt;
|
||||
enum client_buffer_type type;
|
||||
struct wl_buffer *wl_buffer;
|
||||
void *data;
|
||||
size_t bytes;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue