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

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

Issue 2404513002: exo: Implement zcr_linux_explicit_synchronization_v1
Patch Set: Created 4 years, 2 months 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.90 */
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_fencing_v1 - Protocol for providing explicit fencing support
36 * - @subpage page_iface_zcr_explicit_fenced_surface_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_explicit_fenced_surface_v1;
64 struct zcr_linux_explicit_fencing_v1;
65
66 /**
67 * @page page_iface_zcr_linux_explicit_fencing_v1 zcr_linux_explicit_fencing_v1
68 * @section page_iface_zcr_linux_explicit_fencing_v1_desc Description
69 *
70 * The global interface that allows clients to subscribe for explicit
71 * synchronization fences for given wl_surface.
72 * @section page_iface_zcr_linux_explicit_fencing_v1_api API
73 * See @ref iface_zcr_linux_explicit_fencing_v1.
74 */
75 /**
76 * @defgroup iface_zcr_linux_explicit_fencing_v1 The zcr_linux_explicit_fencing_ v1 interface
77 *
78 * The global interface that allows clients to subscribe for explicit
79 * synchronization fences for given wl_surface.
80 */
81 extern const struct wl_interface zcr_linux_explicit_fencing_v1_interface;
82 /**
83 * @page page_iface_zcr_explicit_fenced_surface_v1 zcr_explicit_fenced_surface_v 1
84 * @section page_iface_zcr_explicit_fenced_surface_v1_api API
85 * See @ref iface_zcr_explicit_fenced_surface_v1.
86 */
87 /**
88 * @defgroup iface_zcr_explicit_fenced_surface_v1 The zcr_explicit_fenced_surfac e_v1 interface
89 */
90 extern const struct wl_interface zcr_explicit_fenced_surface_v1_interface;
91
92 #ifndef ZCR_LINUX_EXPLICIT_FENCING_V1_ERROR_ENUM
93 #define ZCR_LINUX_EXPLICIT_FENCING_V1_ERROR_ENUM
94 enum zcr_linux_explicit_fencing_v1_error {
95 /**
96 * the surface already has an fencing object associated
97 */
98 ZCR_LINUX_EXPLICIT_FENCING_V1_ERROR_FENCING_EXISTS = 0,
99 };
100 #endif /* ZCR_LINUX_EXPLICIT_FENCING_V1_ERROR_ENUM */
101
102 /**
103 * @ingroup iface_zcr_linux_explicit_fencing_v1
104 * @struct zcr_linux_explicit_fencing_v1_interface
105 */
106 struct zcr_linux_explicit_fencing_v1_interface {
107 /**
108 * destroy explicit fencing 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 fencing
118 *
119 * Instantiate an interface extension for the given wl_surface to
120 * provide explicit fencing. If the given wl_surface already has an
121 * explicit fencing object associated, the fencing_exists protocol
122 * error is raised.
123 *
124 * Please see the zcr_explicit_fenced_surface_v1 protocol
125 * description for details of how this affects the behaviour of the
126 * wl_surface it is created against.
127 * @param id the new surface-fencing interface id
128 * @param surface the surface
129 */
130 void (*get_fencing)(struct wl_client *client,
131 struct wl_resource *resource,
132 uint32_t id,
133 struct wl_resource *surface);
134 };
135
136
137 /**
138 * @ingroup iface_zcr_explicit_fenced_surface_v1
139 * @struct zcr_explicit_fenced_surface_v1_interface
140 */
141 struct zcr_explicit_fenced_surface_v1_interface {
142 /**
143 * destroy synchronization object
144 *
145 * Destroy this explicit synchronization object.
146 */
147 void (*destroy)(struct wl_client *client,
148 struct wl_resource *resource);
149 /**
150 * set the acquire fence
151 *
152 * Set the acquire fence that must be signaled before the
153 * compositor is allowed to read the pixels in the pending
154 * wl_buffer.
155 *
156 * The acquire state is double-buffered state, and will be applied
157 * on the next wl_surface.commit.
158 * @param fd fence fd
159 */
160 void (*set_acquire_fence)(struct wl_client *client,
161 struct wl_resource *resource,
162 int32_t fd);
163 };
164
165 #define ZCR_EXPLICIT_FENCED_SURFACE_V1_PRESENT 0
166
167 /**
168 * @ingroup iface_zcr_explicit_fenced_surface_v1
169 */
170 #define ZCR_EXPLICIT_FENCED_SURFACE_V1_PRESENT_SINCE_VERSION 1
171
172 /**
173 * @ingroup iface_zcr_explicit_fenced_surface_v1
174 * Sends an present event to the client owning the resource.
175 * @param resource_ The client's resource
176 * @param fd fence fd
177 */
178 static inline void
179 zcr_explicit_fenced_surface_v1_send_present(struct wl_resource *resource_, int32 _t fd)
180 {
181 wl_resource_post_event(resource_, ZCR_EXPLICIT_FENCED_SURFACE_V1_PRESENT , fd);
182 }
183
184 #ifdef __cplusplus
185 }
186 #endif
187
188 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698