subsurface commit and render

This commit is contained in:
Tony Crisci 2017-09-24 18:24:48 -04:00
parent 5cbb4f5ca0
commit 86bc4840a0
3 changed files with 322 additions and 134 deletions

View file

@ -18,6 +18,8 @@ struct wlr_frame_callback {
#define WLR_SURFACE_INVALID_INPUT_REGION 16
#define WLR_SURFACE_INVALID_TRANSFORM 32
#define WLR_SURFACE_INVALID_SCALE 64
#define WLR_SURFACE_INVALID_SUBSURFACE_POSITION 128
#define WLR_SURFACE_INVALID_FRAME_CALLBACK_LIST 256
struct wlr_surface_state {
uint32_t invalid;
@ -29,6 +31,12 @@ struct wlr_surface_state {
int32_t scale;
int width, height;
int buffer_width, buffer_height;
struct {
int32_t x, y;
} subsurface_position;
struct wl_list frame_callback_list; // wl_surface.frame
};
struct wlr_subsurface {
@ -36,25 +44,19 @@ struct wlr_subsurface {
struct wlr_surface *surface;
struct wlr_surface *parent;
struct wlr_surface_state cached;
struct {
int32_t x, y;
} position;
struct {
int32_t x, y;
bool set;
} pending_position;
struct wlr_surface_state *cached;
bool has_cache;
bool synchronized;
struct wl_list parent_link;
};
struct wlr_surface {
struct wl_resource *resource;
struct wlr_renderer *renderer;
struct wlr_texture *texture;
struct wlr_surface_state current, pending;
struct wlr_surface_state *current, *pending;
const char *role; // the lifetime-bound role or null
float buffer_to_surface_matrix[16];
@ -66,13 +68,13 @@ struct wlr_surface {
struct wl_signal destroy;
} signals;
struct wl_list frame_callback_list; // wl_surface.frame
// destroy listener used by compositor
struct wl_listener compositor_listener;
void *compositor_data;
// subsurface properties
struct wlr_subsurface *subsurface;
struct wl_list subsurface_list; // wlr_subsurface::parent_link
void *data;
};