mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-25 06:59:42 -05:00
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:
parent
89dcecba39
commit
835208db98
5 changed files with 27 additions and 16 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue