From b947448795d604f169246b0c3191028ae6a0ab83 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 1 Aug 2020 15:32:48 +0200 Subject: Initial commit Can display a single PNG image scaled-to-fit on all outputs. --- shm.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 shm.h (limited to 'shm.h') diff --git a/shm.h b/shm.h new file mode 100644 index 0000000..54d9674 --- /dev/null +++ b/shm.h @@ -0,0 +1,25 @@ +#pragma once + +#include +#include + +#include +#include + +struct buffer { + int width; + int height; + int stride; + unsigned long cookie; + + bool busy; + bool purge; + size_t size; + void *mmapped; + + struct wl_buffer *wl_buf; + pixman_image_t *pix; +}; + +struct buffer *shm_get_buffer(struct wl_shm *shm, int width, int height, unsigned long cookie); +void shm_fini(void); -- cgit v1.2.3