diff --git a/meson.build b/meson.build index 2fe65b9..12ef085 100644 --- a/meson.build +++ b/meson.build @@ -67,6 +67,7 @@ staging_protocols = { 'pointer-warp': ['v1'], 'security-context': ['v1'], 'single-pixel-buffer': ['v1'], + 'surface-invalidation': ['v1'], 'tearing-control': ['v1'], 'xdg-activation': ['v1'], 'xdg-dialog': ['v1'], diff --git a/staging/surface-invalidation/README b/staging/surface-invalidation/README new file mode 100644 index 0000000..97ac7de --- /dev/null +++ b/staging/surface-invalidation/README @@ -0,0 +1,4 @@ +Surface invalidation protocol + +Maintainers: +Simon Ser diff --git a/staging/surface-invalidation/surface-invalidation-v1.xml b/staging/surface-invalidation/surface-invalidation-v1.xml new file mode 100644 index 0000000..7c99095 --- /dev/null +++ b/staging/surface-invalidation/surface-invalidation-v1.xml @@ -0,0 +1,121 @@ + + + + Copyright © 2022 Simon Ser + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice (including the next + paragraph) shall be included in all copies or substantial portions of the + Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + + + This protocol allows compositors to invalidate surfaces. Clients are + required to submit a new buffer after the compositor invalidates a surface. + Compositors might take advantage of this protocol to recover from GPU + resets. + + Warning! The protocol described in this file is currently in the testing + phase. Backward compatible changes may be added together with the + corresponding interface version bump. Backward incompatible changes can + only be done by creating a new major version of the extension. + + + + + A factory interface to create surface invalidation objects. + + + + + + + + + Destroy the wp_surface_invalidation_manager_v1 object. + + The child objects created via this interface are unaffected. + + + + + + Create a wl_surface extension for invalidation. + + Clients must create at most one wp_surface_invalidation_v1 per + wl_surface object, otherwise the already_constructed protocol + error is sent. + + + + + + + + + An add-on interface for wl_surface to handle invalidation events. + + Creating this object signals to the compositor that the client + supports invalidation events on this surface. + + + + + + + + + + Sent by the compositor when the surface has been invalidated. + + The client is required to handle the invalidated event by + attaching a new buffer on the surface, sending an ack request + with the same serial as the event, and then committing the + surface. + + A compositor may raise an unresponsive protocol error to clients + that does not acknowledge an invalidation event in time. The + timeout used is up to the compositor. + + + + + + + Acknowledge a surface invalidation event. + + This event must be paired with a request to attach a new buffer + on the surface, and needs to be followed by a surface commit to + be applied. + + If the serial doesn't match a previous invalidated event, or if + the same serial is acked twice, the invalid_serial protocol + error is raised. + + + + + + + Destroy the surface invalidation object. + + + +