From 3ab267e2158248cfb0c26b2e2754dc916c3c4d57 Mon Sep 17 00:00:00 2001 From: YaoBing Xiao Date: Mon, 1 Sep 2025 17:18:58 +0800 Subject: [PATCH] ext-image-copy-capture-v1: add set_viewport request for cropping Add a set_viewport request to ext_image_copy_capture_frame_v1 to allow clients to capture a specific region of the source instead of the entire source area. Signed-off-by: YaoBing Xiao --- .../ext-image-copy-capture-v1.xml | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/staging/ext-image-copy-capture/ext-image-copy-capture-v1.xml b/staging/ext-image-copy-capture/ext-image-copy-capture-v1.xml index 1ac4369..1a802af 100644 --- a/staging/ext-image-copy-capture/ext-image-copy-capture-v1.xml +++ b/staging/ext-image-copy-capture/ext-image-copy-capture-v1.xml @@ -199,7 +199,7 @@ - + This object represents an image capture frame. @@ -217,6 +217,7 @@ + @@ -284,6 +285,36 @@ + + + Set a viewport for the capture, cropping the source to a specific + region. The viewport is defined in the source's coordinate system. + + The coordinates (x, y) specify the top-left corner of the viewport + relative to the source's top-left corner. The width and height + specify the dimensions of the region to capture. + + If this request is not called, the whole source is captured. + + If width or height are zero or negative, the invalid_viewport protocol + error is raised. + + The viewport must be fully contained within the source boundaries at + the time of capture. + + When the viewport is set or changed, the client should damage the + entire buffer for the next capture, as the relationship between + source content and buffer content may have changed. + + This request must not be sent after capture, or else the + already_captured protocol error is raised. + + + + + + + This event is sent before the ready event and holds the transform that