1<?xml version="1.0" encoding="UTF-8"?> 2<protocol name="wp_virtio_gpu_metadata_v1"> 3 <copyright> 4 Copyright 2021 The Chromium Authors. 5 Permission is hereby granted, free of charge, to any person obtaining a 6 copy of this software and associated documentation files (the "Software"), 7 to deal in the Software without restriction, including without limitation 8 the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 and/or sell copies of the Software, and to permit persons to whom the 10 Software is furnished to do so, subject to the following conditions: 11 The above copyright notice and this permission notice (including the next 12 paragraph) shall be included in all copies or substantial portions of the 13 Software. 14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 DEALINGS IN THE SOFTWARE. 21 </copyright> 22 23 <interface name="wp_virtio_gpu_metadata_v1" version="1"> 24 <description summary="attach virtio gpu metadata"> 25 The global interface which allows attaching virtio-gpu metadata 26 to wl_surface objects. 27 </description> 28 29 <enum name="error"> 30 <entry name="surface_metadata_exists" value="0" 31 summary="the surface already has a metadata object associated"/> 32 </enum> 33 34 <request name="get_surface_metadata"> 35 <description summary="extend surface interface for attaching metadata"> 36 Instantiate an virtio_gpu_surface_metadata_v1 extension for the given 37 wl_surface to attach virtio gpu metadata. If the given wl_surface 38 already has a surface metadata object associated, the 39 surface_metadata_exists protocol error is raised. 40 </description> 41 <arg name="id" type="new_id" interface="wp_virtio_gpu_surface_metadata_v1" 42 summary="the new metadata interface id"/> 43 <arg name="surface" type="object" interface="wl_surface" 44 summary="the surface"/> 45 </request> 46 </interface> 47 48 <interface name="wp_virtio_gpu_surface_metadata_v1" version="1"> 49 <description summary="interface to attach virtio gpu metadata to a wl_surface"> 50 An additional interface to a wl_surface object, which allows the 51 client to attach additional metadata to the surface. 52 53 If the wl_surface associated with the virtio_gpu_surface_metadata_v1 is 54 destroyed, all virtio_gpu_surface_metadata_v1 requests except 'destroy' 55 raise the protocol error no_surface. 56 57 If the virtio_gpu_surface_metadata_v1 object is destroyed, the metadata 58 state is removed from the wl_surface. The change will be applied 59 on the next wl_surface.commit. 60 </description> 61 62 <enum name="error"> 63 <entry name="no_surface" value="0" 64 summary="the wl_surface was destroyed"/> 65 </enum> 66 67 <request name="set_scanout_id"> 68 <description summary="set the virtio gpu scanout id of the surface"> 69 Set the virtio gpu scanout id of the associated wl_surface. 70 </description> 71 <arg name="scanout_id" type="uint" summary="virtio gpu scanout id"/> 72 </request> 73 </interface> 74 75</protocol> 76