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 /examples | |
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 'examples')
-rw-r--r-- | examples/output-layers.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/output-layers.c b/examples/output-layers.c index d2f3c188..2ccfafe1 100644 --- a/examples/output-layers.c +++ b/examples/output-layers.c @@ -74,8 +74,12 @@ static void output_handle_frame(struct wl_listener *listener, void *data) { *layer_state = (struct wlr_output_layer_state){ .layer = output_surface->layer, .buffer = output_surface->buffer, - .x = output_surface->x, - .y = output_surface->y, + .dst_box = { + .x = output_surface->x, + .y = output_surface->y, + .width = output_surface->wlr_surface->current.width, + .height = output_surface->wlr_surface->current.height, + }, }; } |