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

Side by Side Diff: chromium_gensrc/egl/wayland/wayland-drm/wayland-drm-server-protocol.h

Issue 1419063004: Merge upstream version of wayland-drm.xml and include autogenerated files in chromium_gensrc. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/mesa.git@master
Patch Set: Created 5 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 /*
2 * Copyright © 2008-2011 Kristian Høgsberg
3 * Copyright © 2010-2011 Intel Corporation
4 *
5 * Permission to use, copy, modify, distribute, and sell this
6 * software and its documentation for any purpose is hereby granted
7 * without fee, provided that\n the above copyright notice appear in
8 * all copies and that both that copyright notice and this permission
9 * notice appear in supporting documentation, and that the name of
10 * the copyright holders not be used in advertising or publicity
11 * pertaining to distribution of the software without specific,
12 * written prior permission. The copyright holders make no
13 * representations about the suitability of this software for any
14 * purpose. It is provided "as is" without express or implied
15 * warranty.
16 *
17 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
18 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
19 * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
21 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
22 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
23 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
24 * THIS SOFTWARE.
25 */
26
27 #ifndef DRM_SERVER_PROTOCOL_H
28 #define DRM_SERVER_PROTOCOL_H
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #include <stdint.h>
35 #include <stddef.h>
36 #include "wayland-util.h"
37
38 struct wl_client;
39 struct wl_resource;
40
41 struct wl_drm;
42
43 extern const struct wl_interface wl_drm_interface;
44
45 #ifndef WL_DRM_ERROR_ENUM
46 #define WL_DRM_ERROR_ENUM
47 enum wl_drm_error {
48 WL_DRM_ERROR_AUTHENTICATE_FAIL = 0,
49 WL_DRM_ERROR_INVALID_FORMAT = 1,
50 WL_DRM_ERROR_INVALID_NAME = 2,
51 };
52 #endif /* WL_DRM_ERROR_ENUM */
53
54 #ifndef WL_DRM_FORMAT_ENUM
55 #define WL_DRM_FORMAT_ENUM
56 enum wl_drm_format {
57 WL_DRM_FORMAT_C8 = 0x20203843,
58 WL_DRM_FORMAT_RGB332 = 0x38424752,
59 WL_DRM_FORMAT_BGR233 = 0x38524742,
60 WL_DRM_FORMAT_XRGB4444 = 0x32315258,
61 WL_DRM_FORMAT_XBGR4444 = 0x32314258,
62 WL_DRM_FORMAT_RGBX4444 = 0x32315852,
63 WL_DRM_FORMAT_BGRX4444 = 0x32315842,
64 WL_DRM_FORMAT_ARGB4444 = 0x32315241,
65 WL_DRM_FORMAT_ABGR4444 = 0x32314241,
66 WL_DRM_FORMAT_RGBA4444 = 0x32314152,
67 WL_DRM_FORMAT_BGRA4444 = 0x32314142,
68 WL_DRM_FORMAT_XRGB1555 = 0x35315258,
69 WL_DRM_FORMAT_XBGR1555 = 0x35314258,
70 WL_DRM_FORMAT_RGBX5551 = 0x35315852,
71 WL_DRM_FORMAT_BGRX5551 = 0x35315842,
72 WL_DRM_FORMAT_ARGB1555 = 0x35315241,
73 WL_DRM_FORMAT_ABGR1555 = 0x35314241,
74 WL_DRM_FORMAT_RGBA5551 = 0x35314152,
75 WL_DRM_FORMAT_BGRA5551 = 0x35314142,
76 WL_DRM_FORMAT_RGB565 = 0x36314752,
77 WL_DRM_FORMAT_BGR565 = 0x36314742,
78 WL_DRM_FORMAT_RGB888 = 0x34324752,
79 WL_DRM_FORMAT_BGR888 = 0x34324742,
80 WL_DRM_FORMAT_XRGB8888 = 0x34325258,
81 WL_DRM_FORMAT_XBGR8888 = 0x34324258,
82 WL_DRM_FORMAT_RGBX8888 = 0x34325852,
83 WL_DRM_FORMAT_BGRX8888 = 0x34325842,
84 WL_DRM_FORMAT_ARGB8888 = 0x34325241,
85 WL_DRM_FORMAT_ABGR8888 = 0x34324241,
86 WL_DRM_FORMAT_RGBA8888 = 0x34324152,
87 WL_DRM_FORMAT_BGRA8888 = 0x34324142,
88 WL_DRM_FORMAT_XRGB2101010 = 0x30335258,
89 WL_DRM_FORMAT_XBGR2101010 = 0x30334258,
90 WL_DRM_FORMAT_RGBX1010102 = 0x30335852,
91 WL_DRM_FORMAT_BGRX1010102 = 0x30335842,
92 WL_DRM_FORMAT_ARGB2101010 = 0x30335241,
93 WL_DRM_FORMAT_ABGR2101010 = 0x30334241,
94 WL_DRM_FORMAT_RGBA1010102 = 0x30334152,
95 WL_DRM_FORMAT_BGRA1010102 = 0x30334142,
96 WL_DRM_FORMAT_YUYV = 0x56595559,
97 WL_DRM_FORMAT_YVYU = 0x55595659,
98 WL_DRM_FORMAT_UYVY = 0x59565955,
99 WL_DRM_FORMAT_VYUY = 0x59555956,
100 WL_DRM_FORMAT_AYUV = 0x56555941,
101 WL_DRM_FORMAT_NV12 = 0x3231564e,
102 WL_DRM_FORMAT_NV21 = 0x3132564e,
103 WL_DRM_FORMAT_NV16 = 0x3631564e,
104 WL_DRM_FORMAT_NV61 = 0x3136564e,
105 WL_DRM_FORMAT_YUV410 = 0x39565559,
106 WL_DRM_FORMAT_YVU410 = 0x39555659,
107 WL_DRM_FORMAT_YUV411 = 0x31315559,
108 WL_DRM_FORMAT_YVU411 = 0x31315659,
109 WL_DRM_FORMAT_YUV420 = 0x32315559,
110 WL_DRM_FORMAT_YVU420 = 0x32315659,
111 WL_DRM_FORMAT_YUV422 = 0x36315559,
112 WL_DRM_FORMAT_YVU422 = 0x36315659,
113 WL_DRM_FORMAT_YUV444 = 0x34325559,
114 WL_DRM_FORMAT_YVU444 = 0x34325659,
115 };
116 #endif /* WL_DRM_FORMAT_ENUM */
117
118 #ifndef WL_DRM_CAPABILITY_ENUM
119 #define WL_DRM_CAPABILITY_ENUM
120 /**
121 * wl_drm_capability - wl_drm capability bitmask
122 * @WL_DRM_CAPABILITY_PRIME: wl_drm prime available
123 *
124 * Bitmask of capabilities.
125 */
126 enum wl_drm_capability {
127 WL_DRM_CAPABILITY_PRIME = 1,
128 };
129 #endif /* WL_DRM_CAPABILITY_ENUM */
130
131 struct wl_drm_interface {
132 /**
133 * authenticate - (none)
134 * @id: (none)
135 */
136 void (*authenticate)(struct wl_client *client,
137 struct wl_resource *resource,
138 uint32_t id);
139 /**
140 * create_buffer - (none)
141 * @id: (none)
142 * @name: (none)
143 * @width: (none)
144 * @height: (none)
145 * @stride: (none)
146 * @format: (none)
147 */
148 void (*create_buffer)(struct wl_client *client,
149 struct wl_resource *resource,
150 uint32_t id,
151 uint32_t name,
152 int32_t width,
153 int32_t height,
154 uint32_t stride,
155 uint32_t format);
156 /**
157 * create_planar_buffer - (none)
158 * @id: (none)
159 * @name: (none)
160 * @width: (none)
161 * @height: (none)
162 * @format: (none)
163 * @offset0: (none)
164 * @stride0: (none)
165 * @offset1: (none)
166 * @stride1: (none)
167 * @offset2: (none)
168 * @stride2: (none)
169 */
170 void (*create_planar_buffer)(struct wl_client *client,
171 struct wl_resource *resource,
172 uint32_t id,
173 uint32_t name,
174 int32_t width,
175 int32_t height,
176 uint32_t format,
177 int32_t offset0,
178 int32_t stride0,
179 int32_t offset1,
180 int32_t stride1,
181 int32_t offset2,
182 int32_t stride2);
183 /**
184 * create_prime_buffer - (none)
185 * @id: (none)
186 * @name: (none)
187 * @width: (none)
188 * @height: (none)
189 * @format: (none)
190 * @offset0: (none)
191 * @stride0: (none)
192 * @offset1: (none)
193 * @stride1: (none)
194 * @offset2: (none)
195 * @stride2: (none)
196 * @since: 2
197 */
198 void (*create_prime_buffer)(struct wl_client *client,
199 struct wl_resource *resource,
200 uint32_t id,
201 int32_t name,
202 int32_t width,
203 int32_t height,
204 uint32_t format,
205 int32_t offset0,
206 int32_t stride0,
207 int32_t offset1,
208 int32_t stride1,
209 int32_t offset2,
210 int32_t stride2);
211 };
212
213 #define WL_DRM_DEVICE 0
214 #define WL_DRM_FORMAT 1
215 #define WL_DRM_AUTHENTICATED 2
216 #define WL_DRM_CAPABILITIES 3
217
218 static inline void
219 wl_drm_send_device(struct wl_resource *resource_, const char *name)
220 {
221 wl_resource_post_event(resource_, WL_DRM_DEVICE, name);
222 }
223
224 static inline void
225 wl_drm_send_format(struct wl_resource *resource_, uint32_t format)
226 {
227 wl_resource_post_event(resource_, WL_DRM_FORMAT, format);
228 }
229
230 static inline void
231 wl_drm_send_authenticated(struct wl_resource *resource_)
232 {
233 wl_resource_post_event(resource_, WL_DRM_AUTHENTICATED);
234 }
235
236 static inline void
237 wl_drm_send_capabilities(struct wl_resource *resource_, uint32_t value)
238 {
239 wl_resource_post_event(resource_, WL_DRM_CAPABILITIES, value);
240 }
241
242 #ifdef __cplusplus
243 }
244 #endif
245
246 #endif
OLDNEW
« no previous file with comments | « chromium_gensrc/egl/wayland/wayland-drm/wayland-drm-protocol.c ('k') | src/egl/wayland/wayland-drm/wayland-drm.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698