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). --- examples/output-layers.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'examples/output-layers.c') 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, + }, }; } -- cgit v1.2.3