aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-08-11 15:19:26 +0200
committerSimon Ser <contact@emersion.fr>2021-08-11 18:13:12 +0200
commit3f9e4f7a447daa0c53c010c78dff7f8143b9268f (patch)
tree101fb528163ac397b69dd9f2e846093de38b9a1f /include
parent111d4eafd795e603f652b426d2cb3dae1d8692dc (diff)
surface: kill wlr_surface.previous
This wlr_surface_state field was a special case because we don't want to save the whole current state: for instance, the wlr_buffer must not be saved or else wouldn't get released soon enough. Let's just inline the state fields we need instead.
Diffstat (limited to 'include')
-rw-r--r--include/wlr/types/wlr_surface.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h
index cdf42222..a9859d7b 100644
--- a/include/wlr/types/wlr_surface.h
+++ b/include/wlr/types/wlr_surface.h
@@ -124,10 +124,9 @@ struct wlr_surface {
/**
* `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. `previous` contains the state of
- * the previous commit.
+ * be accessed by the compositor directly.
*/
- struct wlr_surface_state current, pending, previous;
+ struct wlr_surface_state current, pending;
struct wl_list cached; // wlr_surface_state.cached_link
@@ -150,9 +149,18 @@ struct wlr_surface {
struct wl_list current_outputs; // wlr_surface_output::link
+ void *data;
+
+ // private state
+
struct wl_listener renderer_destroy;
- void *data;
+ struct {
+ int32_t scale;
+ enum wl_output_transform transform;
+ int width, height;
+ int buffer_width, buffer_height;
+ } previous;
};
struct wlr_subsurface_state {