mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
output-layer: add cropping support
Add a src_box state field. Use the SRC_* KMS props in the DRM backend, reject the layers in the Wayland backend (for now, we can support it later via viewporter).
This commit is contained in:
parent
d795824346
commit
44069dfd5e
4 changed files with 23 additions and 4 deletions
|
|
@ -294,6 +294,13 @@ static bool output_test(struct wlr_output *wlr_output,
|
|||
height != layer_state->dst_box.height) {
|
||||
supported = false;
|
||||
}
|
||||
if (!wlr_fbox_empty(&layer_state->src_box)) {
|
||||
supported = supported &&
|
||||
layer_state->src_box.x == 0 &&
|
||||
layer_state->src_box.y == 0 &&
|
||||
layer_state->src_box.width == width &&
|
||||
layer_state->src_box.height == height;
|
||||
}
|
||||
supported = supported &&
|
||||
test_buffer(output->backend, layer_state->buffer);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue