Make GL bindings conditional
[chromium-blink-merge.git] / ui / gl / gl_bindings_autogen_egl.h
blobf184b6a22138f843251bbc76f512f44aba3ce1cd
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // This file is auto-generated from
6 // ui/gl/generate_bindings.py
7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT!
11 #ifndef UI_GFX_GL_GL_BINDINGS_AUTOGEN_EGL_H_
12 #define UI_GFX_GL_GL_BINDINGS_AUTOGEN_EGL_H_
14 namespace gfx {
16 class GLContext;
18 typedef EGLBoolean(GL_BINDING_CALL* eglBindAPIProc)(EGLenum api);
19 typedef EGLBoolean(GL_BINDING_CALL* eglBindTexImageProc)(EGLDisplay dpy,
20 EGLSurface surface,
21 EGLint buffer);
22 typedef EGLBoolean(GL_BINDING_CALL* eglChooseConfigProc)(
23 EGLDisplay dpy,
24 const EGLint* attrib_list,
25 EGLConfig* configs,
26 EGLint config_size,
27 EGLint* num_config);
28 typedef EGLint(GL_BINDING_CALL* eglClientWaitSyncKHRProc)(EGLDisplay dpy,
29 EGLSyncKHR sync,
30 EGLint flags,
31 EGLTimeKHR timeout);
32 typedef EGLBoolean(GL_BINDING_CALL* eglCopyBuffersProc)(
33 EGLDisplay dpy,
34 EGLSurface surface,
35 EGLNativePixmapType target);
36 typedef EGLContext(GL_BINDING_CALL* eglCreateContextProc)(
37 EGLDisplay dpy,
38 EGLConfig config,
39 EGLContext share_context,
40 const EGLint* attrib_list);
41 typedef EGLImageKHR(GL_BINDING_CALL* eglCreateImageKHRProc)(
42 EGLDisplay dpy,
43 EGLContext ctx,
44 EGLenum target,
45 EGLClientBuffer buffer,
46 const EGLint* attrib_list);
47 typedef EGLSurface(GL_BINDING_CALL* eglCreatePbufferFromClientBufferProc)(
48 EGLDisplay dpy,
49 EGLenum buftype,
50 void* buffer,
51 EGLConfig config,
52 const EGLint* attrib_list);
53 typedef EGLSurface(GL_BINDING_CALL* eglCreatePbufferSurfaceProc)(
54 EGLDisplay dpy,
55 EGLConfig config,
56 const EGLint* attrib_list);
57 typedef EGLSurface(GL_BINDING_CALL* eglCreatePixmapSurfaceProc)(
58 EGLDisplay dpy,
59 EGLConfig config,
60 EGLNativePixmapType pixmap,
61 const EGLint* attrib_list);
62 typedef EGLSyncKHR(GL_BINDING_CALL* eglCreateSyncKHRProc)(
63 EGLDisplay dpy,
64 EGLenum type,
65 const EGLint* attrib_list);
66 typedef EGLSurface(GL_BINDING_CALL* eglCreateWindowSurfaceProc)(
67 EGLDisplay dpy,
68 EGLConfig config,
69 EGLNativeWindowType win,
70 const EGLint* attrib_list);
71 typedef EGLBoolean(GL_BINDING_CALL* eglDestroyContextProc)(EGLDisplay dpy,
72 EGLContext ctx);
73 typedef EGLBoolean(GL_BINDING_CALL* eglDestroyImageKHRProc)(EGLDisplay dpy,
74 EGLImageKHR image);
75 typedef EGLBoolean(GL_BINDING_CALL* eglDestroySurfaceProc)(EGLDisplay dpy,
76 EGLSurface surface);
77 typedef EGLBoolean(GL_BINDING_CALL* eglDestroySyncKHRProc)(EGLDisplay dpy,
78 EGLSyncKHR sync);
79 typedef EGLBoolean(GL_BINDING_CALL* eglGetConfigAttribProc)(EGLDisplay dpy,
80 EGLConfig config,
81 EGLint attribute,
82 EGLint* value);
83 typedef EGLBoolean(GL_BINDING_CALL* eglGetConfigsProc)(EGLDisplay dpy,
84 EGLConfig* configs,
85 EGLint config_size,
86 EGLint* num_config);
87 typedef EGLContext(GL_BINDING_CALL* eglGetCurrentContextProc)(void);
88 typedef EGLDisplay(GL_BINDING_CALL* eglGetCurrentDisplayProc)(void);
89 typedef EGLSurface(GL_BINDING_CALL* eglGetCurrentSurfaceProc)(EGLint readdraw);
90 typedef EGLDisplay(GL_BINDING_CALL* eglGetDisplayProc)(
91 EGLNativeDisplayType display_id);
92 typedef EGLint(GL_BINDING_CALL* eglGetErrorProc)(void);
93 typedef EGLDisplay(GL_BINDING_CALL* eglGetPlatformDisplayEXTProc)(
94 EGLenum platform,
95 void* native_display,
96 const EGLint* attrib_list);
97 typedef __eglMustCastToProperFunctionPointerType(
98 GL_BINDING_CALL* eglGetProcAddressProc)(const char* procname);
99 typedef EGLBoolean(GL_BINDING_CALL* eglGetSyncAttribKHRProc)(EGLDisplay dpy,
100 EGLSyncKHR sync,
101 EGLint attribute,
102 EGLint* value);
103 typedef EGLBoolean(GL_BINDING_CALL* eglGetSyncValuesCHROMIUMProc)(
104 EGLDisplay dpy,
105 EGLSurface surface,
106 EGLuint64CHROMIUM* ust,
107 EGLuint64CHROMIUM* msc,
108 EGLuint64CHROMIUM* sbc);
109 typedef EGLBoolean(GL_BINDING_CALL* eglInitializeProc)(EGLDisplay dpy,
110 EGLint* major,
111 EGLint* minor);
112 typedef EGLBoolean(GL_BINDING_CALL* eglMakeCurrentProc)(EGLDisplay dpy,
113 EGLSurface draw,
114 EGLSurface read,
115 EGLContext ctx);
116 typedef EGLBoolean(GL_BINDING_CALL* eglPostSubBufferNVProc)(EGLDisplay dpy,
117 EGLSurface surface,
118 EGLint x,
119 EGLint y,
120 EGLint width,
121 EGLint height);
122 typedef EGLenum(GL_BINDING_CALL* eglQueryAPIProc)(void);
123 typedef EGLBoolean(GL_BINDING_CALL* eglQueryContextProc)(EGLDisplay dpy,
124 EGLContext ctx,
125 EGLint attribute,
126 EGLint* value);
127 typedef const char*(GL_BINDING_CALL* eglQueryStringProc)(EGLDisplay dpy,
128 EGLint name);
129 typedef EGLBoolean(GL_BINDING_CALL* eglQuerySurfaceProc)(EGLDisplay dpy,
130 EGLSurface surface,
131 EGLint attribute,
132 EGLint* value);
133 typedef EGLBoolean(GL_BINDING_CALL* eglQuerySurfacePointerANGLEProc)(
134 EGLDisplay dpy,
135 EGLSurface surface,
136 EGLint attribute,
137 void** value);
138 typedef EGLBoolean(GL_BINDING_CALL* eglReleaseTexImageProc)(EGLDisplay dpy,
139 EGLSurface surface,
140 EGLint buffer);
141 typedef EGLBoolean(GL_BINDING_CALL* eglReleaseThreadProc)(void);
142 typedef EGLBoolean(GL_BINDING_CALL* eglSurfaceAttribProc)(EGLDisplay dpy,
143 EGLSurface surface,
144 EGLint attribute,
145 EGLint value);
146 typedef EGLBoolean(GL_BINDING_CALL* eglSwapBuffersProc)(EGLDisplay dpy,
147 EGLSurface surface);
148 typedef EGLBoolean(GL_BINDING_CALL* eglSwapIntervalProc)(EGLDisplay dpy,
149 EGLint interval);
150 typedef EGLBoolean(GL_BINDING_CALL* eglTerminateProc)(EGLDisplay dpy);
151 typedef EGLBoolean(GL_BINDING_CALL* eglWaitClientProc)(void);
152 typedef EGLBoolean(GL_BINDING_CALL* eglWaitGLProc)(void);
153 typedef EGLBoolean(GL_BINDING_CALL* eglWaitNativeProc)(EGLint engine);
154 typedef EGLint(GL_BINDING_CALL* eglWaitSyncKHRProc)(EGLDisplay dpy,
155 EGLSyncKHR sync,
156 EGLint flags);
158 struct ExtensionsEGL {
159 bool b_EGL_ANGLE_d3d_share_handle_client_buffer;
160 bool b_EGL_ANGLE_platform_angle;
161 bool b_EGL_ANGLE_query_surface_pointer;
162 bool b_EGL_ANGLE_surface_d3d_texture_2d_share_handle;
163 bool b_EGL_CHROMIUM_sync_control;
164 bool b_EGL_KHR_fence_sync;
165 bool b_EGL_KHR_gl_texture_2D_image;
166 bool b_EGL_KHR_image;
167 bool b_EGL_KHR_image_base;
168 bool b_EGL_KHR_reusable_sync;
169 bool b_EGL_KHR_wait_sync;
170 bool b_EGL_NV_post_sub_buffer;
173 struct ProcsEGL {
174 eglBindAPIProc eglBindAPIFn;
175 eglBindTexImageProc eglBindTexImageFn;
176 eglChooseConfigProc eglChooseConfigFn;
177 eglClientWaitSyncKHRProc eglClientWaitSyncKHRFn;
178 eglCopyBuffersProc eglCopyBuffersFn;
179 eglCreateContextProc eglCreateContextFn;
180 eglCreateImageKHRProc eglCreateImageKHRFn;
181 eglCreatePbufferFromClientBufferProc eglCreatePbufferFromClientBufferFn;
182 eglCreatePbufferSurfaceProc eglCreatePbufferSurfaceFn;
183 eglCreatePixmapSurfaceProc eglCreatePixmapSurfaceFn;
184 eglCreateSyncKHRProc eglCreateSyncKHRFn;
185 eglCreateWindowSurfaceProc eglCreateWindowSurfaceFn;
186 eglDestroyContextProc eglDestroyContextFn;
187 eglDestroyImageKHRProc eglDestroyImageKHRFn;
188 eglDestroySurfaceProc eglDestroySurfaceFn;
189 eglDestroySyncKHRProc eglDestroySyncKHRFn;
190 eglGetConfigAttribProc eglGetConfigAttribFn;
191 eglGetConfigsProc eglGetConfigsFn;
192 eglGetCurrentContextProc eglGetCurrentContextFn;
193 eglGetCurrentDisplayProc eglGetCurrentDisplayFn;
194 eglGetCurrentSurfaceProc eglGetCurrentSurfaceFn;
195 eglGetDisplayProc eglGetDisplayFn;
196 eglGetErrorProc eglGetErrorFn;
197 eglGetPlatformDisplayEXTProc eglGetPlatformDisplayEXTFn;
198 eglGetProcAddressProc eglGetProcAddressFn;
199 eglGetSyncAttribKHRProc eglGetSyncAttribKHRFn;
200 eglGetSyncValuesCHROMIUMProc eglGetSyncValuesCHROMIUMFn;
201 eglInitializeProc eglInitializeFn;
202 eglMakeCurrentProc eglMakeCurrentFn;
203 eglPostSubBufferNVProc eglPostSubBufferNVFn;
204 eglQueryAPIProc eglQueryAPIFn;
205 eglQueryContextProc eglQueryContextFn;
206 eglQueryStringProc eglQueryStringFn;
207 eglQuerySurfaceProc eglQuerySurfaceFn;
208 eglQuerySurfacePointerANGLEProc eglQuerySurfacePointerANGLEFn;
209 eglReleaseTexImageProc eglReleaseTexImageFn;
210 eglReleaseThreadProc eglReleaseThreadFn;
211 eglSurfaceAttribProc eglSurfaceAttribFn;
212 eglSwapBuffersProc eglSwapBuffersFn;
213 eglSwapIntervalProc eglSwapIntervalFn;
214 eglTerminateProc eglTerminateFn;
215 eglWaitClientProc eglWaitClientFn;
216 eglWaitGLProc eglWaitGLFn;
217 eglWaitNativeProc eglWaitNativeFn;
218 eglWaitSyncKHRProc eglWaitSyncKHRFn;
221 class GL_EXPORT EGLApi {
222 public:
223 EGLApi();
224 virtual ~EGLApi();
226 virtual EGLBoolean eglBindAPIFn(EGLenum api) = 0;
227 virtual EGLBoolean eglBindTexImageFn(EGLDisplay dpy,
228 EGLSurface surface,
229 EGLint buffer) = 0;
230 virtual EGLBoolean eglChooseConfigFn(EGLDisplay dpy,
231 const EGLint* attrib_list,
232 EGLConfig* configs,
233 EGLint config_size,
234 EGLint* num_config) = 0;
235 virtual EGLint eglClientWaitSyncKHRFn(EGLDisplay dpy,
236 EGLSyncKHR sync,
237 EGLint flags,
238 EGLTimeKHR timeout) = 0;
239 virtual EGLBoolean eglCopyBuffersFn(EGLDisplay dpy,
240 EGLSurface surface,
241 EGLNativePixmapType target) = 0;
242 virtual EGLContext eglCreateContextFn(EGLDisplay dpy,
243 EGLConfig config,
244 EGLContext share_context,
245 const EGLint* attrib_list) = 0;
246 virtual EGLImageKHR eglCreateImageKHRFn(EGLDisplay dpy,
247 EGLContext ctx,
248 EGLenum target,
249 EGLClientBuffer buffer,
250 const EGLint* attrib_list) = 0;
251 virtual EGLSurface eglCreatePbufferFromClientBufferFn(
252 EGLDisplay dpy,
253 EGLenum buftype,
254 void* buffer,
255 EGLConfig config,
256 const EGLint* attrib_list) = 0;
257 virtual EGLSurface eglCreatePbufferSurfaceFn(EGLDisplay dpy,
258 EGLConfig config,
259 const EGLint* attrib_list) = 0;
260 virtual EGLSurface eglCreatePixmapSurfaceFn(EGLDisplay dpy,
261 EGLConfig config,
262 EGLNativePixmapType pixmap,
263 const EGLint* attrib_list) = 0;
264 virtual EGLSyncKHR eglCreateSyncKHRFn(EGLDisplay dpy,
265 EGLenum type,
266 const EGLint* attrib_list) = 0;
267 virtual EGLSurface eglCreateWindowSurfaceFn(EGLDisplay dpy,
268 EGLConfig config,
269 EGLNativeWindowType win,
270 const EGLint* attrib_list) = 0;
271 virtual EGLBoolean eglDestroyContextFn(EGLDisplay dpy, EGLContext ctx) = 0;
272 virtual EGLBoolean eglDestroyImageKHRFn(EGLDisplay dpy,
273 EGLImageKHR image) = 0;
274 virtual EGLBoolean eglDestroySurfaceFn(EGLDisplay dpy,
275 EGLSurface surface) = 0;
276 virtual EGLBoolean eglDestroySyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync) = 0;
277 virtual EGLBoolean eglGetConfigAttribFn(EGLDisplay dpy,
278 EGLConfig config,
279 EGLint attribute,
280 EGLint* value) = 0;
281 virtual EGLBoolean eglGetConfigsFn(EGLDisplay dpy,
282 EGLConfig* configs,
283 EGLint config_size,
284 EGLint* num_config) = 0;
285 virtual EGLContext eglGetCurrentContextFn(void) = 0;
286 virtual EGLDisplay eglGetCurrentDisplayFn(void) = 0;
287 virtual EGLSurface eglGetCurrentSurfaceFn(EGLint readdraw) = 0;
288 virtual EGLDisplay eglGetDisplayFn(EGLNativeDisplayType display_id) = 0;
289 virtual EGLint eglGetErrorFn(void) = 0;
290 virtual EGLDisplay eglGetPlatformDisplayEXTFn(EGLenum platform,
291 void* native_display,
292 const EGLint* attrib_list) = 0;
293 virtual __eglMustCastToProperFunctionPointerType eglGetProcAddressFn(
294 const char* procname) = 0;
295 virtual EGLBoolean eglGetSyncAttribKHRFn(EGLDisplay dpy,
296 EGLSyncKHR sync,
297 EGLint attribute,
298 EGLint* value) = 0;
299 virtual EGLBoolean eglGetSyncValuesCHROMIUMFn(EGLDisplay dpy,
300 EGLSurface surface,
301 EGLuint64CHROMIUM* ust,
302 EGLuint64CHROMIUM* msc,
303 EGLuint64CHROMIUM* sbc) = 0;
304 virtual EGLBoolean eglInitializeFn(EGLDisplay dpy,
305 EGLint* major,
306 EGLint* minor) = 0;
307 virtual EGLBoolean eglMakeCurrentFn(EGLDisplay dpy,
308 EGLSurface draw,
309 EGLSurface read,
310 EGLContext ctx) = 0;
311 virtual EGLBoolean eglPostSubBufferNVFn(EGLDisplay dpy,
312 EGLSurface surface,
313 EGLint x,
314 EGLint y,
315 EGLint width,
316 EGLint height) = 0;
317 virtual EGLenum eglQueryAPIFn(void) = 0;
318 virtual EGLBoolean eglQueryContextFn(EGLDisplay dpy,
319 EGLContext ctx,
320 EGLint attribute,
321 EGLint* value) = 0;
322 virtual const char* eglQueryStringFn(EGLDisplay dpy, EGLint name) = 0;
323 virtual EGLBoolean eglQuerySurfaceFn(EGLDisplay dpy,
324 EGLSurface surface,
325 EGLint attribute,
326 EGLint* value) = 0;
327 virtual EGLBoolean eglQuerySurfacePointerANGLEFn(EGLDisplay dpy,
328 EGLSurface surface,
329 EGLint attribute,
330 void** value) = 0;
331 virtual EGLBoolean eglReleaseTexImageFn(EGLDisplay dpy,
332 EGLSurface surface,
333 EGLint buffer) = 0;
334 virtual EGLBoolean eglReleaseThreadFn(void) = 0;
335 virtual EGLBoolean eglSurfaceAttribFn(EGLDisplay dpy,
336 EGLSurface surface,
337 EGLint attribute,
338 EGLint value) = 0;
339 virtual EGLBoolean eglSwapBuffersFn(EGLDisplay dpy, EGLSurface surface) = 0;
340 virtual EGLBoolean eglSwapIntervalFn(EGLDisplay dpy, EGLint interval) = 0;
341 virtual EGLBoolean eglTerminateFn(EGLDisplay dpy) = 0;
342 virtual EGLBoolean eglWaitClientFn(void) = 0;
343 virtual EGLBoolean eglWaitGLFn(void) = 0;
344 virtual EGLBoolean eglWaitNativeFn(EGLint engine) = 0;
345 virtual EGLint eglWaitSyncKHRFn(EGLDisplay dpy,
346 EGLSyncKHR sync,
347 EGLint flags) = 0;
350 } // namespace gfx
352 #define eglBindAPI ::gfx::g_current_egl_context->eglBindAPIFn
353 #define eglBindTexImage ::gfx::g_current_egl_context->eglBindTexImageFn
354 #define eglChooseConfig ::gfx::g_current_egl_context->eglChooseConfigFn
355 #define eglClientWaitSyncKHR \
356 ::gfx::g_current_egl_context->eglClientWaitSyncKHRFn
357 #define eglCopyBuffers ::gfx::g_current_egl_context->eglCopyBuffersFn
358 #define eglCreateContext ::gfx::g_current_egl_context->eglCreateContextFn
359 #define eglCreateImageKHR ::gfx::g_current_egl_context->eglCreateImageKHRFn
360 #define eglCreatePbufferFromClientBuffer \
361 ::gfx::g_current_egl_context->eglCreatePbufferFromClientBufferFn
362 #define eglCreatePbufferSurface \
363 ::gfx::g_current_egl_context->eglCreatePbufferSurfaceFn
364 #define eglCreatePixmapSurface \
365 ::gfx::g_current_egl_context->eglCreatePixmapSurfaceFn
366 #define eglCreateSyncKHR ::gfx::g_current_egl_context->eglCreateSyncKHRFn
367 #define eglCreateWindowSurface \
368 ::gfx::g_current_egl_context->eglCreateWindowSurfaceFn
369 #define eglDestroyContext ::gfx::g_current_egl_context->eglDestroyContextFn
370 #define eglDestroyImageKHR ::gfx::g_current_egl_context->eglDestroyImageKHRFn
371 #define eglDestroySurface ::gfx::g_current_egl_context->eglDestroySurfaceFn
372 #define eglDestroySyncKHR ::gfx::g_current_egl_context->eglDestroySyncKHRFn
373 #define eglGetConfigAttrib ::gfx::g_current_egl_context->eglGetConfigAttribFn
374 #define eglGetConfigs ::gfx::g_current_egl_context->eglGetConfigsFn
375 #define eglGetCurrentContext \
376 ::gfx::g_current_egl_context->eglGetCurrentContextFn
377 #define eglGetCurrentDisplay \
378 ::gfx::g_current_egl_context->eglGetCurrentDisplayFn
379 #define eglGetCurrentSurface \
380 ::gfx::g_current_egl_context->eglGetCurrentSurfaceFn
381 #define eglGetDisplay ::gfx::g_current_egl_context->eglGetDisplayFn
382 #define eglGetError ::gfx::g_current_egl_context->eglGetErrorFn
383 #define eglGetPlatformDisplayEXT \
384 ::gfx::g_current_egl_context->eglGetPlatformDisplayEXTFn
385 #define eglGetProcAddress ::gfx::g_current_egl_context->eglGetProcAddressFn
386 #define eglGetSyncAttribKHR ::gfx::g_current_egl_context->eglGetSyncAttribKHRFn
387 #define eglGetSyncValuesCHROMIUM \
388 ::gfx::g_current_egl_context->eglGetSyncValuesCHROMIUMFn
389 #define eglInitialize ::gfx::g_current_egl_context->eglInitializeFn
390 #define eglMakeCurrent ::gfx::g_current_egl_context->eglMakeCurrentFn
391 #define eglPostSubBufferNV ::gfx::g_current_egl_context->eglPostSubBufferNVFn
392 #define eglQueryAPI ::gfx::g_current_egl_context->eglQueryAPIFn
393 #define eglQueryContext ::gfx::g_current_egl_context->eglQueryContextFn
394 #define eglQueryString ::gfx::g_current_egl_context->eglQueryStringFn
395 #define eglQuerySurface ::gfx::g_current_egl_context->eglQuerySurfaceFn
396 #define eglQuerySurfacePointerANGLE \
397 ::gfx::g_current_egl_context->eglQuerySurfacePointerANGLEFn
398 #define eglReleaseTexImage ::gfx::g_current_egl_context->eglReleaseTexImageFn
399 #define eglReleaseThread ::gfx::g_current_egl_context->eglReleaseThreadFn
400 #define eglSurfaceAttrib ::gfx::g_current_egl_context->eglSurfaceAttribFn
401 #define eglSwapBuffers ::gfx::g_current_egl_context->eglSwapBuffersFn
402 #define eglSwapInterval ::gfx::g_current_egl_context->eglSwapIntervalFn
403 #define eglTerminate ::gfx::g_current_egl_context->eglTerminateFn
404 #define eglWaitClient ::gfx::g_current_egl_context->eglWaitClientFn
405 #define eglWaitGL ::gfx::g_current_egl_context->eglWaitGLFn
406 #define eglWaitNative ::gfx::g_current_egl_context->eglWaitNativeFn
407 #define eglWaitSyncKHR ::gfx::g_current_egl_context->eglWaitSyncKHRFn
409 #endif // UI_GFX_GL_GL_BINDINGS_AUTOGEN_EGL_H_