From 909b0213b390d445006f1b3d125214dc8df19b5e Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Fri, 24 Apr 2020 18:12:20 +0000 Subject: [PATCH] protocol: screencopy: Extend to report linux-dmabuf capability A new version of the protocol is required so that the client can discover which buffer types are supported by the compositor. --- protocol/wlr-screencopy-unstable-v1.xml | 53 ++++++++++++++++++------- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/protocol/wlr-screencopy-unstable-v1.xml b/protocol/wlr-screencopy-unstable-v1.xml index e4c21f80..50b1b7d2 100644 --- a/protocol/wlr-screencopy-unstable-v1.xml +++ b/protocol/wlr-screencopy-unstable-v1.xml @@ -38,7 +38,7 @@ interface version number is reset. - + This object is a manager which offers requests to start capturing from a source. @@ -80,13 +80,18 @@ - + This object represents a single frame. - When created, a "buffer" event will be sent. The client will then be able - to send a "copy" request. If the capture is successful, the compositor - will send a "flags" followed by a "ready" event. + When created, a series of buffer events will be sent, each representing a + supported buffer type. The "buffer_done" event is sent afterwards to + indicate that all supported buffer types have been enumerated. The client + will then be able to send a "copy" request. If the capture is successful, + the compositor will send a "flags" followed by a "ready" event. + + For objects version 2 or lower, wl_shm buffers are always supported, ie. + the "buffer" event is guaranteed to be sent. If the capture failed, the "failed" event is sent. This can happen anytime before the "ready" event. @@ -96,14 +101,12 @@ - - Provides information about the frame's buffer. This event is sent once - as soon as the frame is created. - - The client should then create a buffer with the provided attributes, and - send a "copy" request. + + Provides information about wl_shm buffer parameters that need to be + used for this frame. This event is sent once after the frame is created + if wl_shm buffers are supported. - + @@ -112,8 +115,9 @@ Copy the frame to the supplied buffer. The buffer must have a the - correct size, see zwlr_screencopy_frame_v1.buffer. The buffer needs to - have a supported format. + correct size, see zwlr_screencopy_frame_v1.buffer and + zwlr_screencopy_frame_v1.linux_dmabuf. The buffer needs to have a + supported format. If the frame is successfully copied, a "flags" and a "ready" events are sent. Otherwise, a "failed" event is sent. @@ -203,5 +207,26 @@ + + + + + Provides information about linux-dmabuf buffer parameters that need to + be used for this frame. This event is sent once after the frame is + created if linux-dmabuf buffers are supported. + + + + + + + + + This event is sent once after all buffer events have been sent. + + The client should proceed to create a buffer of one of the supported + types, and send a "copy" request. + +