diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-09-24 18:24:48 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-09-30 08:55:40 -0400 |
commit | 86bc4840a069480cfcc71e38bc959d8133b2d7c6 (patch) | |
tree | 93fcaae1e23a29195a289105f388a52a3ddba71c /include | |
parent | 5cbb4f5ca036deb29f2712414d2bd054c6eec4d7 (diff) |
subsurface commit and render
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_surface.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h index 07f19b67..c9abf042 100644 --- a/include/wlr/types/wlr_surface.h +++ b/include/wlr/types/wlr_surface.h @@ -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; }; |