Deduplicate some drwbuf fields

We have those fields on the drwbuf struct, but we always use the
same ones. Let's deduplicate those fields by moving them on the drwsurf.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
Willow Barraco
2025-04-17 17:58:39 +02:00
committed by Maarten van Gompel
parent 55b88bc14f
commit 73caeee513
2 changed files with 25 additions and 23 deletions

4
drw.h
View File

@@ -10,12 +10,10 @@ struct drw {
struct drwbuf {
uint32_t size;
struct wl_buffer *buf;
cairo_region_t *damage, *backport_damage;
cairo_surface_t *cairo_surf;
cairo_t *cairo;
PangoLayout *layout;
unsigned char *pool_data;
bool released;
};
struct drwsurf {
uint32_t width, height;
@@ -26,7 +24,9 @@ struct drwsurf {
struct wl_shm *shm;
struct wl_callback *frame_cb;
cairo_region_t *damage, *backport_damage;
bool attached;
bool released;
struct drwbuf *back_buffer;
struct drwbuf *display_buffer;