aboutsummaryrefslogtreecommitdiff
path: root/shm.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-07-15 20:17:12 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-07-17 17:14:41 +0000
commit75f7f21a48f3c4054cae024ff769b781481786a7 (patch)
treec49d0be2cae3438630f4d6ecda36c82575c58491 /shm.h
parentMerge branch 'allow-bleeding-glyphs' (diff)
shm: split up buffer struct into internal/private and public parts
Diffstat (limited to 'shm.h')
-rw-r--r--shm.h21
1 files changed, 1 insertions, 20 deletions
diff --git a/shm.h b/shm.h
index 610f0311..01f1a711 100644
--- a/shm.h
+++ b/shm.h
@@ -9,25 +9,13 @@
#include "terminal.h"
-struct buffer_pool {
- int fd; /* memfd */
- struct wl_shm_pool *wl_pool;
-
- void *real_mmapped; /* Address returned from mmap */
- size_t mmap_size; /* Size of mmap (>= size) */
-
- size_t ref_count;
-};
-
struct buffer {
- unsigned long cookie;
+ bool locked; /* Caller owned, shm won’t destroy it */
int width;
int height;
int stride;
- bool locked; /* Caller owned, shm won’t destroy it */
- bool busy; /* Owned by compositor */
size_t size; /* Buffer size */
void *mmapped; /* Raw data (TODO: rename) */
@@ -35,13 +23,6 @@ struct buffer {
pixman_image_t **pix;
size_t pix_instances;
- /* Internal */
- struct buffer_pool *pool;
- off_t offset; /* Offset into memfd where data begins */
-
- bool scrollable;
- bool purge; /* True if this buffer should be destroyed */
-
unsigned age;
struct damage *scroll_damage;
size_t scroll_damage_count;