aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-04-04 19:38:48 +0200
committerSimon Ser <contact@emersion.fr>2023-04-04 19:39:38 +0200
commit835208db98a29431fa687c9506f4b43fe645ff65 (patch)
tree4c3b007974822e8afebdfb6186a3d02edd010fd8 /backend/drm
parent89dcecba39d4f49b673f2fa976354c91413a4c3f (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 'backend/drm')
-rw-r--r--backend/drm/libliftoff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/backend/drm/libliftoff.c b/backend/drm/libliftoff.c
index 90525d24..cd62dccb 100644
--- a/backend/drm/libliftoff.c
+++ b/backend/drm/libliftoff.c
@@ -196,10 +196,10 @@ static bool set_layer_props(struct wlr_drm_backend *drm,
return false;
}
- uint64_t crtc_x = (uint64_t)state->x;
- uint64_t crtc_y = (uint64_t)state->y;
- uint64_t crtc_w = (uint64_t)width;
- uint64_t crtc_h = (uint64_t)height;
+ uint64_t crtc_x = (uint64_t)state->dst_box.x;
+ uint64_t crtc_y = (uint64_t)state->dst_box.y;
+ uint64_t crtc_w = (uint64_t)state->dst_box.width;
+ uint64_t crtc_h = (uint64_t)state->dst_box.height;
uint64_t src_x = to_fp16(0);
uint64_t src_y = to_fp16(0);