mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-14 08:21:27 -04:00
shm: split up buffer struct into internal/private and public parts
This commit is contained in:
parent
a18959f2df
commit
75f7f21a48
2 changed files with 127 additions and 99 deletions
21
shm.h
21
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue