compositor: reorganize struct weston_buffer_viewport
Queueing in the Presentation extension requires splitting the viewport
state into buffer state and surface state. To conveniently allow
assigning only one, the other, or both, reorganize the
weston_buffer_viewport structure.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
diff --git a/src/compositor.h b/src/compositor.h
index 8fb8afb..f1f126b 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -655,20 +655,25 @@
};
struct weston_buffer_viewport {
- /* wl_surface.set_buffer_transform */
- uint32_t transform;
+ struct {
+ /* wl_surface.set_buffer_transform */
+ uint32_t transform;
- /* wl_surface.set_scaling_factor */
- int32_t scale;
+ /* wl_surface.set_scaling_factor */
+ int32_t scale;
- /* bool for whether wl_viewport.set has been
- * called yet (before this is called there is no
- * cropping or scaling on the surface) */
- int viewport_set; /* bool */
+ /* bool for whether wl_viewport.set has been
+ * called yet (before this is called there is no
+ * cropping or scaling on the surface) */
+ int viewport_set; /* bool */
- wl_fixed_t src_x, src_y;
- wl_fixed_t src_width, src_height;
- int32_t dst_width, dst_height;
+ wl_fixed_t src_x, src_y;
+ wl_fixed_t src_width, src_height;
+ } buffer;
+
+ struct {
+ int32_t width, height;
+ } surface;
};
struct weston_region {