From 2f1c189d535c2d8dce74ec44c670305f00e4a30c Mon Sep 17 00:00:00 2001 From: adnano Date: Sun, 16 Jan 2022 08:32:58 -0500 Subject: Initial commit --- pool-buffer.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 pool-buffer.h (limited to 'pool-buffer.h') diff --git a/pool-buffer.h b/pool-buffer.h new file mode 100644 index 0000000..67a643c --- /dev/null +++ b/pool-buffer.h @@ -0,0 +1,21 @@ +/* Taken from sway. MIT licensed */ +#include +#include +#include +#include +#include + +struct pool_buffer { + struct wl_buffer *buffer; + cairo_surface_t *surface; + cairo_t *cairo; + PangoContext *pango; + size_t size; + int32_t width, height, scale; + void *data; + bool busy; +}; + +struct pool_buffer *get_next_buffer(struct wl_shm *shm, + struct pool_buffer pool[static 2], int32_t width, int32_t height, int32_t scale); +void destroy_buffer(struct pool_buffer *buffer); -- cgit v1.2.3