diff options
author | emersion <contact@emersion.fr> | 2018-06-28 23:49:40 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-07-04 19:12:17 +0100 |
commit | 78555abba3fdd272f50dcb8b8bf3b7811ddd9fc5 (patch) | |
tree | c62002bf3d25cbd168ac233ab8ea89a9fda685e2 /include | |
parent | 233bfe2f4f7859fa293a33a5b4022eaae7eb6cb3 (diff) |
surface: move position and scale out of wlr_surface_state
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_surface.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h index fdfc716d..a587e7bc 100644 --- a/include/wlr/types/wlr_surface.h +++ b/include/wlr/types/wlr_surface.h @@ -32,8 +32,6 @@ struct wlr_surface_state { int width, height; // in surface-local coordinates int buffer_width, buffer_height; - int sx, sy; // in surface-local coordinates - pixman_region32_t damage; // in buffer-local coordinates struct wl_listener buffer_destroy_listener; }; @@ -49,6 +47,21 @@ struct wlr_surface { */ struct wlr_buffer *buffer; /** + * The buffer position, in surface-local units. + */ + int sx, sy; + /** + * The last commit's buffer damage, in buffer-local coordinates. This + * contains both the damage accumulated by the client via + * `wlr_surface_state.surface_damage` and `wlr_surface_state.buffer_damage`. + * If the buffer has changed its size or moved, the whole buffer is + * damaged. + * + * This region needs to be scaled and transformed into output coordinates, + * just like the buffer's texture. + */ + pixman_region32_t buffer_damage; + /** * `current` contains the current, committed surface state. `pending` * accumulates state changes from the client between commits and shouldn't * be accessed by the compositor directly. |