Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: third_party/wayland-protocols/include/protocol/linux-explicit-synchronization-unstable-v1-server-protocol.h

Issue 2397843002: wayland-protocols: Add protocol for explicit synchronization support.
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /* Generated by wayland-scanner 1.11.0 */
2
3 #ifndef LINUX_EXPLICIT_SYNCHRONIZATION_UNSTABLE_V1_SERVER_PROTOCOL_H
4 #define LINUX_EXPLICIT_SYNCHRONIZATION_UNSTABLE_V1_SERVER_PROTOCOL_H
5
6 #include <stdint.h>
7 #include <stddef.h>
8 #include "wayland-server.h"
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13
14 struct wl_client;
15 struct wl_resource;
16
17 /**
18 * @page page_linux_explicit_synchronization_unstable_v1 The linux_explicit_sync hronization_unstable_v1 protocol
19 * Protocol for explicit synchronization
20 *
21 * @section page_desc_linux_explicit_synchronization_unstable_v1 Description
22 *
23 * This protocol specifies a set of interfaces used to provide explicit
24 * synchronization of buffers to the the client.
25 *
26 * Warning! The protocol described in this file is experimental and backward
27 * incompatible changes may be made. Backward compatible changes may be added
28 * together with the corresponding interface version bump. Backward
29 * incompatible changes are done by bumping the version number in the protocol
30 * and interface names and resetting the interface version. Once the protocol
31 * is to be declared stable, the version number in the protocol is removed and
32 * the interface version number is reset.
33 *
34 * @section page_ifaces_linux_explicit_synchronization_unstable_v1 Interfaces
35 * - @subpage page_iface_zcr_linux_explicit_synchronization_v1 - Protocol for pr oviding explicit synchronization
36 * - @subpage page_iface_zcr_synchronization_v1 -
37 * @section page_copyright_linux_explicit_synchronization_unstable_v1 Copyright
38 * <pre>
39 *
40 * Copyright 2016 The Chromium Authors.
41 *
42 * Permission is hereby granted, free of charge, to any person obtaining a
43 * copy of this software and associated documentation files (the "Software"),
44 * to deal in the Software without restriction, including without limitation
45 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
46 * and/or sell copies of the Software, and to permit persons to whom the
47 * Software is furnished to do so, subject to the following conditions:
48 *
49 * The above copyright notice and this permission notice (including the next
50 * paragraph) shall be included in all copies or substantial portions of the
51 * Software.
52 *
53 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
54 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
55 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
56 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
57 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
58 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
59 * DEALINGS IN THE SOFTWARE.
60 * </pre>
61 */
62 struct wl_surface;
63 struct zcr_linux_explicit_synchronization_v1;
64 struct zcr_synchronization_v1;
65
66 /**
67 * @page page_iface_zcr_linux_explicit_synchronization_v1 zcr_linux_explicit_syn chronization_v1
68 * @section page_iface_zcr_linux_explicit_synchronization_v1_desc Description
69 *
70 * The global interface that allows clients to set explicit synchronization
71 * fences for given wl_surface.
72 * @section page_iface_zcr_linux_explicit_synchronization_v1_api API
73 * See @ref iface_zcr_linux_explicit_synchronization_v1.
74 */
75 /**
76 * @defgroup iface_zcr_linux_explicit_synchronization_v1 The zcr_linux_explicit_ synchronization_v1 interface
77 *
78 * The global interface that allows clients to set explicit synchronization
79 * fences for given wl_surface.
80 */
81 extern const struct wl_interface zcr_linux_explicit_synchronization_v1_interface ;
82 /**
83 * @page page_iface_zcr_synchronization_v1 zcr_synchronization_v1
84 * @section page_iface_zcr_synchronization_v1_api API
85 * See @ref iface_zcr_synchronization_v1.
86 */
87 /**
88 * @defgroup iface_zcr_synchronization_v1 The zcr_synchronization_v1 interface
89 */
90 extern const struct wl_interface zcr_synchronization_v1_interface;
91
92 #ifndef ZCR_LINUX_EXPLICIT_SYNCHRONIZATION_V1_ERROR_ENUM
93 #define ZCR_LINUX_EXPLICIT_SYNCHRONIZATION_V1_ERROR_ENUM
94 enum zcr_linux_explicit_synchronization_v1_error {
95 /**
96 * the surface already has an synchronization object associated
97 */
98 ZCR_LINUX_EXPLICIT_SYNCHRONIZATION_V1_ERROR_SYNCHRONIZATION_EXISTS = 0,
99 };
100 #endif /* ZCR_LINUX_EXPLICIT_SYNCHRONIZATION_V1_ERROR_ENUM */
101
102 /**
103 * @ingroup iface_zcr_linux_explicit_synchronization_v1
104 * @struct zcr_linux_explicit_synchronization_v1_interface
105 */
106 struct zcr_linux_explicit_synchronization_v1_interface {
107 /**
108 * destroy explicit synchronization object
109 *
110 * Destroy this explicit synchronization object. Existing
111 * explicit synchronization objects shall not be affected by this
112 * request.
113 */
114 void (*destroy)(struct wl_client *client,
115 struct wl_resource *resource);
116 /**
117 * extend surface interface for explicit synchronization
118 *
119 * Instantiate an interface extension for the given wl_surface to
120 * provide explicit synchronization. If the given wl_surface
121 * already has an explicit synchronization object associated, the
122 * synchronization_exists protocol error is raised.
123 * @param id the new synchronization interface id
124 * @param surface the surface
125 */
126 void (*get_synchronization)(struct wl_client *client,
127 struct wl_resource *resource,
128 uint32_t id,
129 struct wl_resource *surface);
130 };
131
132
133 #ifndef ZCR_SYNCHRONIZATION_V1_ERROR_ENUM
134 #define ZCR_SYNCHRONIZATION_V1_ERROR_ENUM
135 enum zcr_synchronization_v1_error {
136 /**
137 * the fence specified by the client could not be imported
138 */
139 ZCR_SYNCHRONIZATION_V1_ERROR_INVALID_FENCE = 0,
140 };
141 #endif /* ZCR_SYNCHRONIZATION_V1_ERROR_ENUM */
142
143 /**
144 * @ingroup iface_zcr_synchronization_v1
145 * @struct zcr_synchronization_v1_interface
146 */
147 struct zcr_synchronization_v1_interface {
148 /**
149 * destroy synchronization object
150 *
151 * Destroy this explicit synchronization object.
152 */
153 void (*destroy)(struct wl_client *client,
154 struct wl_resource *resource);
155 /**
156 * set the acquire fence
157 *
158 * Set the acquire fence that must be signaled before the
159 * compositor is allowed to read the pixels in the pending
160 * wl_buffer.
161 *
162 * The acquire state is double-buffered state, and will be applied
163 * on the next wl_surface.commit.
164 *
165 * If the fence could not be imported, an INVALID_FENCE error is
166 * signaled to the client.
167 * @param fd fence fd
168 */
169 void (*set_acquire_fence)(struct wl_client *client,
170 struct wl_resource *resource,
171 int32_t fd);
172 };
173
174
175 #ifdef __cplusplus
176 }
177 #endif
178
179 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698