diff options
author | Simon Ser <contact@emersion.fr> | 2023-04-04 19:38:48 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-04-04 19:39:38 +0200 |
commit | 835208db98a29431fa687c9506f4b43fe645ff65 (patch) | |
tree | 4c3b007974822e8afebdfb6186a3d02edd010fd8 /include | |
parent | 89dcecba39d4f49b673f2fa976354c91413a4c3f (diff) |
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).
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_output_layer.h | 7 |
1 files changed, 4 insertions, 3 deletions
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 <wlr/render/drm_format_set.h> #include <wlr/types/wlr_output.h> +#include <wlr/util/box.h> #include <wlr/util/addon.h> /** @@ -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 |