aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_surface.h17
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.