1 <?xml version="1.0" encoding="UTF-8"?> 2 <protocol name="alpha_compositing_unstable_v1"> 3 4 <copyright> 5 Copyright 2016 The Chromium Authors. 6 7 Permission is hereby granted, free of charge, to any person obtaining a 8 copy of this software and associated documentation files (the "Software"), 9 to deal in the Software without restriction, including without limitation 10 the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 and/or sell copies of the Software, and to permit persons to whom the 12 Software is furnished to do so, subject to the following conditions: 13 14 The above copyright notice and this permission notice (including the next 15 paragraph) shall be included in all copies or substantial portions of the 16 Software. 17 18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 DEALINGS IN THE SOFTWARE. 25 </copyright> 26 27 <description summary="Protocol for more advanced compositing and blending"> 28 This protocol specifies a set of interfaces used to control the alpha 29 compositing and blending of contents. 30 31 Warning! The protocol described in this file is experimental and backward 32 incompatible changes may be made. Backward compatible changes may be added 33 together with the corresponding interface version bump. Backward 34 incompatible changes are done by bumping the version number in the protocol 35 and interface names and resetting the interface version. Once the protocol 36 is to be declared stable, the 'z' prefix and the version number in the 37 protocol and interface names are removed and the interface version number is 38 reset. 39 </description> 40 41 <interface name="zcr_alpha_compositing_v1" version="1"> 42 <description summary="alpha_compositing"> 43 The global interface exposing compositing and blending capabilities is 44 used to instantiate an interface extension for a wl_surface object. 45 This extended interface will then allow the client to specify the 46 blending equation and alpha value used for compositing the wl_surface. 47 </description> 48 49 <request name="destroy" type="destructor"> 50 <description summary="unbind from the blending interface"> 51 Informs the server that the client will not be using this 52 protocol object anymore. This does not affect any other objects, 53 blending objects included. 54 </description> 55 </request> 56 57 <enum name="error"> 58 <entry name="blending_exists" value="0" 59 summary="the surface already has a blending object associated"/> 60 </enum> 61 62 <request name="get_blending"> 63 <description summary="extend surface interface for blending"> 64 Instantiate an interface extension for the given wl_surface to 65 provide surface blending. If the given wl_surface already has 66 a blending object associated, the blending_exists protocol error 67 is raised. 68 </description> 69 70 <arg name="id" type="new_id" interface="zcr_blending_v1" 71 summary="the new blending interface id"/> 72 <arg name="surface" type="object" interface="wl_surface" 73 summary="the surface"/> 74 </request> 75 </interface> 76 77 <interface name="zcr_blending_v1" version="1"> 78 <description summary="blending interface to a wl_surface"> 79 An additional interface to a wl_surface object, which allows the 80 client to specify the blending equation used for compositing and 81 an alpha value applied to the whole surface. 82 83 If the wl_surface associated with the bledning object is destroyed, 84 the blending object becomes inert. 85 86 If the blending object is destroyed, the blending state is removed 87 from the wl_surface. The change will be applied on the next 88 wl_surface.commit. 89 </description> 90 91 <request name="destroy" type="destructor"> 92 <description summary="remove blending from the surface"> 93 The associated wl_surface's blending state is removed. 94 The change is applied on the next wl_surface.commit. 95 </description> 96 </request> 97 98 <enum name="blending_equation"> 99 <description summary="different blending equations for compositing"> 100 Blending equations that can be used when compositing a surface. 101 </description> 102 <entry name="none" value="0" summary="no blending"/> 103 <entry name="premult" value="1" summary="one / one_minus_src_alpha"/> 104 <entry name="coverage" value="2" summary="src_alpha / one_minus_src_alpha" /> 105 </enum> 106 107 <request name="set_blending"> 108 <description summary="set the blending equation"> 109 Set the blending equation for compositing the wl_surface. 110 See wp_alpha_compositing for the description. 111 112 The blending equation state is double-buffered state, 113 and will be applied on the next wl_surface.commit. 114 </description> 115 <arg name="equation" type="uint" summary="the new blending equation"/> 116 </request> 117 118 <request name="set_alpha"> 119 <description summary="set the alpha value"> 120 Set the alpha value applied to the whole surface for compositing. 121 See wp_alpha_compositing for the description. 122 123 The alpha value state is double-buffered state, 124 and will be applied on the next wl_surface.commit. 125 </description> 126 <arg name="value" type="fixed" summary="the new alpha value"/> 127 </request> 128 </interface> 129 130 </protocol> 131