From 835208db98a29431fa687c9506f4b43fe645ff65 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 4 Apr 2023 19:38:48 +0200 Subject: output-layer: add support for scaling buffers This allows callers to set a destination size different from the buffer size to scale them. The DRM backend supports this. The Wayland backend doesn't yet (we'd need to wire up viewporter). --- include/wlr/types/wlr_output_layer.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_output_layer.h b/include/wlr/types/wlr_output_layer.h index 72dc43d5..8bcd5a27 100644 --- a/include/wlr/types/wlr_output_layer.h +++ b/include/wlr/types/wlr_output_layer.h @@ -11,6 +11,7 @@ #include #include +#include #include /** @@ -51,7 +52,7 @@ struct wlr_output_layer { // private state - int x, y; + struct wlr_box dst_box; }; /** @@ -62,8 +63,8 @@ struct wlr_output_layer_state { // Buffer to display, or NULL to disable the layer struct wlr_buffer *buffer; - // Position in output-buffer-local coordinates - int x, y; + // Destination box in output-buffer-local coordinates + struct wlr_box dst_box; // Populated by the backend after wlr_output_test() and wlr_output_commit(), // indicates whether the backend has acknowledged and will take care of -- cgit v1.2.3