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).
This commit is contained in:
Simon Ser 2023-04-04 19:38:48 +02:00
parent 89dcecba39
commit 835208db98
5 changed files with 27 additions and 16 deletions

View file

@ -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,
},
};
}