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

Side by Side Diff: ui/gl/gl_bindings_autogen_egl.cc

Issue 2629633003: Refactor GL bindings so there is no global GLApi or DriverGL. (Closed)
Patch Set: rebase Created 3 years, 10 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
« no previous file with comments | « ui/gl/gl_bindings.h ('k') | ui/gl/gl_bindings_autogen_gl0.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This file is auto-generated from 5 // This file is auto-generated from
6 // ui/gl/generate_bindings.py 6 // ui/gl/generate_bindings.py
7 // It's formatted by clang-format using chromium coding style: 7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename 8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT! 9 // DO NOT EDIT!
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "base/trace_event/trace_event.h" 13 #include "base/trace_event/trace_event.h"
14 #include "ui/gl/gl_bindings.h" 14 #include "ui/gl/gl_bindings.h"
15 #include "ui/gl/gl_context.h" 15 #include "ui/gl/gl_context.h"
16 #include "ui/gl/gl_egl_api_implementation.h" 16 #include "ui/gl/gl_egl_api_implementation.h"
17 #include "ui/gl/gl_enums.h" 17 #include "ui/gl/gl_enums.h"
18 #include "ui/gl/gl_implementation.h" 18 #include "ui/gl/gl_implementation.h"
19 #include "ui/gl/gl_version_info.h" 19 #include "ui/gl/gl_version_info.h"
20 20
21 namespace gl { 21 namespace gl {
22 22
23 static bool g_debugBindingsInitialized;
24 DriverEGL g_driver_egl; 23 DriverEGL g_driver_egl;
25 24
26 void DriverEGL::InitializeStaticBindings() { 25 void DriverEGL::InitializeStaticBindings() {
27 fn.eglBindAPIFn = 26 fn.eglBindAPIFn =
28 reinterpret_cast<eglBindAPIProc>(GetGLProcAddress("eglBindAPI")); 27 reinterpret_cast<eglBindAPIProc>(GetGLProcAddress("eglBindAPI"));
29 fn.eglBindTexImageFn = reinterpret_cast<eglBindTexImageProc>( 28 fn.eglBindTexImageFn = reinterpret_cast<eglBindTexImageProc>(
30 GetGLProcAddress("eglBindTexImage")); 29 GetGLProcAddress("eglBindTexImage"));
31 fn.eglChooseConfigFn = reinterpret_cast<eglChooseConfigProc>( 30 fn.eglChooseConfigFn = reinterpret_cast<eglChooseConfigProc>(
32 GetGLProcAddress("eglChooseConfig")); 31 GetGLProcAddress("eglChooseConfig"));
33 fn.eglClientWaitSyncKHRFn = reinterpret_cast<eglClientWaitSyncKHRProc>( 32 fn.eglClientWaitSyncKHRFn = reinterpret_cast<eglClientWaitSyncKHRProc>(
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 123 }
125 124
126 void DriverEGL::InitializeClientExtensionBindings() { 125 void DriverEGL::InitializeClientExtensionBindings() {
127 std::string client_extensions(GetClientExtensions()); 126 std::string client_extensions(GetClientExtensions());
128 client_extensions += " "; 127 client_extensions += " ";
129 ALLOW_UNUSED_LOCAL(client_extensions); 128 ALLOW_UNUSED_LOCAL(client_extensions);
130 129
131 ext.b_EGL_EXT_platform_base = 130 ext.b_EGL_EXT_platform_base =
132 client_extensions.find("EGL_EXT_platform_base ") != std::string::npos; 131 client_extensions.find("EGL_EXT_platform_base ") != std::string::npos;
133 132
134 debug_fn.eglGetPlatformDisplayEXTFn = 0;
135 if (ext.b_EGL_EXT_platform_base) { 133 if (ext.b_EGL_EXT_platform_base) {
136 fn.eglGetPlatformDisplayEXTFn = 134 fn.eglGetPlatformDisplayEXTFn =
137 reinterpret_cast<eglGetPlatformDisplayEXTProc>( 135 reinterpret_cast<eglGetPlatformDisplayEXTProc>(
138 GetGLProcAddress("eglGetPlatformDisplayEXT")); 136 GetGLProcAddress("eglGetPlatformDisplayEXT"));
139 } 137 }
140 } 138 }
141 139
142 void DriverEGL::InitializeExtensionBindings() { 140 void DriverEGL::InitializeExtensionBindings() {
143 std::string extensions(GetPlatformExtensions()); 141 std::string extensions(GetPlatformExtensions());
144 extensions += " "; 142 extensions += " ";
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 extensions.find("EGL_KHR_wait_sync ") != std::string::npos; 177 extensions.find("EGL_KHR_wait_sync ") != std::string::npos;
180 ext.b_EGL_NV_post_sub_buffer = 178 ext.b_EGL_NV_post_sub_buffer =
181 extensions.find("EGL_NV_post_sub_buffer ") != std::string::npos; 179 extensions.find("EGL_NV_post_sub_buffer ") != std::string::npos;
182 ext.b_EGL_NV_stream_consumer_gltexture_yuv = 180 ext.b_EGL_NV_stream_consumer_gltexture_yuv =
183 extensions.find("EGL_NV_stream_consumer_gltexture_yuv ") != 181 extensions.find("EGL_NV_stream_consumer_gltexture_yuv ") !=
184 std::string::npos; 182 std::string::npos;
185 ext.b_GL_CHROMIUM_egl_khr_fence_sync_hack = 183 ext.b_GL_CHROMIUM_egl_khr_fence_sync_hack =
186 extensions.find("GL_CHROMIUM_egl_khr_fence_sync_hack ") != 184 extensions.find("GL_CHROMIUM_egl_khr_fence_sync_hack ") !=
187 std::string::npos; 185 std::string::npos;
188 186
189 debug_fn.eglCreateImageKHRFn = 0;
190 if (ext.b_EGL_KHR_image || ext.b_EGL_KHR_image_base || 187 if (ext.b_EGL_KHR_image || ext.b_EGL_KHR_image_base ||
191 ext.b_EGL_KHR_gl_texture_2D_image) { 188 ext.b_EGL_KHR_gl_texture_2D_image) {
192 fn.eglCreateImageKHRFn = reinterpret_cast<eglCreateImageKHRProc>( 189 fn.eglCreateImageKHRFn = reinterpret_cast<eglCreateImageKHRProc>(
193 GetGLProcAddress("eglCreateImageKHR")); 190 GetGLProcAddress("eglCreateImageKHR"));
194 } 191 }
195 192
196 debug_fn.eglCreateStreamKHRFn = 0;
197 if (ext.b_EGL_KHR_stream) { 193 if (ext.b_EGL_KHR_stream) {
198 fn.eglCreateStreamKHRFn = reinterpret_cast<eglCreateStreamKHRProc>( 194 fn.eglCreateStreamKHRFn = reinterpret_cast<eglCreateStreamKHRProc>(
199 GetGLProcAddress("eglCreateStreamKHR")); 195 GetGLProcAddress("eglCreateStreamKHR"));
200 } 196 }
201 197
202 debug_fn.eglCreateStreamProducerD3DTextureNV12ANGLEFn = 0;
203 if (ext.b_EGL_ANGLE_stream_producer_d3d_texture_nv12) { 198 if (ext.b_EGL_ANGLE_stream_producer_d3d_texture_nv12) {
204 fn.eglCreateStreamProducerD3DTextureNV12ANGLEFn = 199 fn.eglCreateStreamProducerD3DTextureNV12ANGLEFn =
205 reinterpret_cast<eglCreateStreamProducerD3DTextureNV12ANGLEProc>( 200 reinterpret_cast<eglCreateStreamProducerD3DTextureNV12ANGLEProc>(
206 GetGLProcAddress("eglCreateStreamProducerD3DTextureNV12ANGLE")); 201 GetGLProcAddress("eglCreateStreamProducerD3DTextureNV12ANGLE"));
207 } 202 }
208 203
209 debug_fn.eglDestroyImageKHRFn = 0;
210 if (ext.b_EGL_KHR_image || ext.b_EGL_KHR_image_base) { 204 if (ext.b_EGL_KHR_image || ext.b_EGL_KHR_image_base) {
211 fn.eglDestroyImageKHRFn = reinterpret_cast<eglDestroyImageKHRProc>( 205 fn.eglDestroyImageKHRFn = reinterpret_cast<eglDestroyImageKHRProc>(
212 GetGLProcAddress("eglDestroyImageKHR")); 206 GetGLProcAddress("eglDestroyImageKHR"));
213 } 207 }
214 208
215 debug_fn.eglDestroyStreamKHRFn = 0;
216 if (ext.b_EGL_KHR_stream) { 209 if (ext.b_EGL_KHR_stream) {
217 fn.eglDestroyStreamKHRFn = reinterpret_cast<eglDestroyStreamKHRProc>( 210 fn.eglDestroyStreamKHRFn = reinterpret_cast<eglDestroyStreamKHRProc>(
218 GetGLProcAddress("eglDestroyStreamKHR")); 211 GetGLProcAddress("eglDestroyStreamKHR"));
219 } 212 }
220 213
221 debug_fn.eglGetSyncValuesCHROMIUMFn = 0;
222 if (ext.b_EGL_CHROMIUM_sync_control) { 214 if (ext.b_EGL_CHROMIUM_sync_control) {
223 fn.eglGetSyncValuesCHROMIUMFn = 215 fn.eglGetSyncValuesCHROMIUMFn =
224 reinterpret_cast<eglGetSyncValuesCHROMIUMProc>( 216 reinterpret_cast<eglGetSyncValuesCHROMIUMProc>(
225 GetGLProcAddress("eglGetSyncValuesCHROMIUM")); 217 GetGLProcAddress("eglGetSyncValuesCHROMIUM"));
226 } 218 }
227 219
228 debug_fn.eglImageFlushExternalEXTFn = 0;
229 if (ext.b_EGL_EXT_image_flush_external) { 220 if (ext.b_EGL_EXT_image_flush_external) {
230 fn.eglImageFlushExternalEXTFn = 221 fn.eglImageFlushExternalEXTFn =
231 reinterpret_cast<eglImageFlushExternalEXTProc>( 222 reinterpret_cast<eglImageFlushExternalEXTProc>(
232 GetGLProcAddress("eglImageFlushExternalEXT")); 223 GetGLProcAddress("eglImageFlushExternalEXT"));
233 } 224 }
234 225
235 debug_fn.eglPostSubBufferNVFn = 0;
236 if (ext.b_EGL_NV_post_sub_buffer) { 226 if (ext.b_EGL_NV_post_sub_buffer) {
237 fn.eglPostSubBufferNVFn = reinterpret_cast<eglPostSubBufferNVProc>( 227 fn.eglPostSubBufferNVFn = reinterpret_cast<eglPostSubBufferNVProc>(
238 GetGLProcAddress("eglPostSubBufferNV")); 228 GetGLProcAddress("eglPostSubBufferNV"));
239 } 229 }
240 230
241 debug_fn.eglQueryStreamKHRFn = 0;
242 if (ext.b_EGL_KHR_stream) { 231 if (ext.b_EGL_KHR_stream) {
243 fn.eglQueryStreamKHRFn = reinterpret_cast<eglQueryStreamKHRProc>( 232 fn.eglQueryStreamKHRFn = reinterpret_cast<eglQueryStreamKHRProc>(
244 GetGLProcAddress("eglQueryStreamKHR")); 233 GetGLProcAddress("eglQueryStreamKHR"));
245 } 234 }
246 235
247 debug_fn.eglQueryStreamu64KHRFn = 0;
248 if (ext.b_EGL_KHR_stream) { 236 if (ext.b_EGL_KHR_stream) {
249 fn.eglQueryStreamu64KHRFn = reinterpret_cast<eglQueryStreamu64KHRProc>( 237 fn.eglQueryStreamu64KHRFn = reinterpret_cast<eglQueryStreamu64KHRProc>(
250 GetGLProcAddress("eglQueryStreamu64KHR")); 238 GetGLProcAddress("eglQueryStreamu64KHR"));
251 } 239 }
252 240
253 debug_fn.eglQuerySurfacePointerANGLEFn = 0;
254 if (ext.b_EGL_ANGLE_query_surface_pointer) { 241 if (ext.b_EGL_ANGLE_query_surface_pointer) {
255 fn.eglQuerySurfacePointerANGLEFn = 242 fn.eglQuerySurfacePointerANGLEFn =
256 reinterpret_cast<eglQuerySurfacePointerANGLEProc>( 243 reinterpret_cast<eglQuerySurfacePointerANGLEProc>(
257 GetGLProcAddress("eglQuerySurfacePointerANGLE")); 244 GetGLProcAddress("eglQuerySurfacePointerANGLE"));
258 } 245 }
259 246
260 debug_fn.eglStreamAttribKHRFn = 0;
261 if (ext.b_EGL_KHR_stream) { 247 if (ext.b_EGL_KHR_stream) {
262 fn.eglStreamAttribKHRFn = reinterpret_cast<eglStreamAttribKHRProc>( 248 fn.eglStreamAttribKHRFn = reinterpret_cast<eglStreamAttribKHRProc>(
263 GetGLProcAddress("eglStreamAttribKHR")); 249 GetGLProcAddress("eglStreamAttribKHR"));
264 } 250 }
265 251
266 debug_fn.eglStreamConsumerAcquireKHRFn = 0;
267 if (ext.b_EGL_KHR_stream_consumer_gltexture) { 252 if (ext.b_EGL_KHR_stream_consumer_gltexture) {
268 fn.eglStreamConsumerAcquireKHRFn = 253 fn.eglStreamConsumerAcquireKHRFn =
269 reinterpret_cast<eglStreamConsumerAcquireKHRProc>( 254 reinterpret_cast<eglStreamConsumerAcquireKHRProc>(
270 GetGLProcAddress("eglStreamConsumerAcquireKHR")); 255 GetGLProcAddress("eglStreamConsumerAcquireKHR"));
271 } 256 }
272 257
273 debug_fn.eglStreamConsumerGLTextureExternalAttribsNVFn = 0;
274 if (ext.b_EGL_NV_stream_consumer_gltexture_yuv) { 258 if (ext.b_EGL_NV_stream_consumer_gltexture_yuv) {
275 fn.eglStreamConsumerGLTextureExternalAttribsNVFn = 259 fn.eglStreamConsumerGLTextureExternalAttribsNVFn =
276 reinterpret_cast<eglStreamConsumerGLTextureExternalAttribsNVProc>( 260 reinterpret_cast<eglStreamConsumerGLTextureExternalAttribsNVProc>(
277 GetGLProcAddress("eglStreamConsumerGLTextureExternalAttribsNV")); 261 GetGLProcAddress("eglStreamConsumerGLTextureExternalAttribsNV"));
278 } 262 }
279 263
280 debug_fn.eglStreamConsumerGLTextureExternalKHRFn = 0;
281 if (ext.b_EGL_KHR_stream_consumer_gltexture) { 264 if (ext.b_EGL_KHR_stream_consumer_gltexture) {
282 fn.eglStreamConsumerGLTextureExternalKHRFn = 265 fn.eglStreamConsumerGLTextureExternalKHRFn =
283 reinterpret_cast<eglStreamConsumerGLTextureExternalKHRProc>( 266 reinterpret_cast<eglStreamConsumerGLTextureExternalKHRProc>(
284 GetGLProcAddress("eglStreamConsumerGLTextureExternalKHR")); 267 GetGLProcAddress("eglStreamConsumerGLTextureExternalKHR"));
285 } 268 }
286 269
287 debug_fn.eglStreamConsumerReleaseKHRFn = 0;
288 if (ext.b_EGL_KHR_stream_consumer_gltexture) { 270 if (ext.b_EGL_KHR_stream_consumer_gltexture) {
289 fn.eglStreamConsumerReleaseKHRFn = 271 fn.eglStreamConsumerReleaseKHRFn =
290 reinterpret_cast<eglStreamConsumerReleaseKHRProc>( 272 reinterpret_cast<eglStreamConsumerReleaseKHRProc>(
291 GetGLProcAddress("eglStreamConsumerReleaseKHR")); 273 GetGLProcAddress("eglStreamConsumerReleaseKHR"));
292 } 274 }
293 275
294 debug_fn.eglStreamPostD3DTextureNV12ANGLEFn = 0;
295 if (ext.b_EGL_ANGLE_stream_producer_d3d_texture_nv12) { 276 if (ext.b_EGL_ANGLE_stream_producer_d3d_texture_nv12) {
296 fn.eglStreamPostD3DTextureNV12ANGLEFn = 277 fn.eglStreamPostD3DTextureNV12ANGLEFn =
297 reinterpret_cast<eglStreamPostD3DTextureNV12ANGLEProc>( 278 reinterpret_cast<eglStreamPostD3DTextureNV12ANGLEProc>(
298 GetGLProcAddress("eglStreamPostD3DTextureNV12ANGLE")); 279 GetGLProcAddress("eglStreamPostD3DTextureNV12ANGLE"));
299 } 280 }
300 281
301 debug_fn.eglSwapBuffersWithDamageKHRFn = 0;
302 if (ext.b_EGL_KHR_swap_buffers_with_damage) { 282 if (ext.b_EGL_KHR_swap_buffers_with_damage) {
303 fn.eglSwapBuffersWithDamageKHRFn = 283 fn.eglSwapBuffersWithDamageKHRFn =
304 reinterpret_cast<eglSwapBuffersWithDamageKHRProc>( 284 reinterpret_cast<eglSwapBuffersWithDamageKHRProc>(
305 GetGLProcAddress("eglSwapBuffersWithDamageKHR")); 285 GetGLProcAddress("eglSwapBuffersWithDamageKHR"));
306 } 286 }
307 287
308 debug_fn.eglWaitSyncKHRFn = 0;
309 if (ext.b_EGL_KHR_wait_sync) { 288 if (ext.b_EGL_KHR_wait_sync) {
310 fn.eglWaitSyncKHRFn = reinterpret_cast<eglWaitSyncKHRProc>( 289 fn.eglWaitSyncKHRFn = reinterpret_cast<eglWaitSyncKHRProc>(
311 GetGLProcAddress("eglWaitSyncKHR")); 290 GetGLProcAddress("eglWaitSyncKHR"));
312 } 291 }
313
314 if (g_debugBindingsInitialized)
315 InitializeDebugBindings();
316 }
317
318 extern "C" {
319
320 static EGLBoolean GL_BINDING_CALL Debug_eglBindAPI(EGLenum api) {
321 GL_SERVICE_LOG("eglBindAPI"
322 << "(" << api << ")");
323 DCHECK(g_driver_egl.debug_fn.eglBindAPIFn != nullptr);
324 EGLBoolean result = g_driver_egl.debug_fn.eglBindAPIFn(api);
325 GL_SERVICE_LOG("GL_RESULT: " << result);
326 return result;
327 }
328
329 static EGLBoolean GL_BINDING_CALL Debug_eglBindTexImage(EGLDisplay dpy,
330 EGLSurface surface,
331 EGLint buffer) {
332 GL_SERVICE_LOG("eglBindTexImage"
333 << "(" << dpy << ", " << surface << ", " << buffer << ")");
334 DCHECK(g_driver_egl.debug_fn.eglBindTexImageFn != nullptr);
335 EGLBoolean result =
336 g_driver_egl.debug_fn.eglBindTexImageFn(dpy, surface, buffer);
337 GL_SERVICE_LOG("GL_RESULT: " << result);
338 return result;
339 }
340
341 static EGLBoolean GL_BINDING_CALL
342 Debug_eglChooseConfig(EGLDisplay dpy,
343 const EGLint* attrib_list,
344 EGLConfig* configs,
345 EGLint config_size,
346 EGLint* num_config) {
347 GL_SERVICE_LOG("eglChooseConfig"
348 << "(" << dpy << ", " << static_cast<const void*>(attrib_list)
349 << ", " << static_cast<const void*>(configs) << ", "
350 << config_size << ", " << static_cast<const void*>(num_config)
351 << ")");
352 DCHECK(g_driver_egl.debug_fn.eglChooseConfigFn != nullptr);
353 EGLBoolean result = g_driver_egl.debug_fn.eglChooseConfigFn(
354 dpy, attrib_list, configs, config_size, num_config);
355 GL_SERVICE_LOG("GL_RESULT: " << result);
356 return result;
357 }
358
359 static EGLint GL_BINDING_CALL Debug_eglClientWaitSyncKHR(EGLDisplay dpy,
360 EGLSyncKHR sync,
361 EGLint flags,
362 EGLTimeKHR timeout) {
363 GL_SERVICE_LOG("eglClientWaitSyncKHR"
364 << "(" << dpy << ", " << sync << ", " << flags << ", "
365 << timeout << ")");
366 DCHECK(g_driver_egl.debug_fn.eglClientWaitSyncKHRFn != nullptr);
367 EGLint result =
368 g_driver_egl.debug_fn.eglClientWaitSyncKHRFn(dpy, sync, flags, timeout);
369 GL_SERVICE_LOG("GL_RESULT: " << result);
370 return result;
371 }
372
373 static EGLBoolean GL_BINDING_CALL
374 Debug_eglCopyBuffers(EGLDisplay dpy,
375 EGLSurface surface,
376 EGLNativePixmapType target) {
377 GL_SERVICE_LOG("eglCopyBuffers"
378 << "(" << dpy << ", " << surface << ", " << target << ")");
379 DCHECK(g_driver_egl.debug_fn.eglCopyBuffersFn != nullptr);
380 EGLBoolean result =
381 g_driver_egl.debug_fn.eglCopyBuffersFn(dpy, surface, target);
382 GL_SERVICE_LOG("GL_RESULT: " << result);
383 return result;
384 }
385
386 static EGLContext GL_BINDING_CALL
387 Debug_eglCreateContext(EGLDisplay dpy,
388 EGLConfig config,
389 EGLContext share_context,
390 const EGLint* attrib_list) {
391 GL_SERVICE_LOG("eglCreateContext"
392 << "(" << dpy << ", " << config << ", " << share_context
393 << ", " << static_cast<const void*>(attrib_list) << ")");
394 DCHECK(g_driver_egl.debug_fn.eglCreateContextFn != nullptr);
395 EGLContext result = g_driver_egl.debug_fn.eglCreateContextFn(
396 dpy, config, share_context, attrib_list);
397 GL_SERVICE_LOG("GL_RESULT: " << result);
398 return result;
399 }
400
401 static EGLImageKHR GL_BINDING_CALL
402 Debug_eglCreateImageKHR(EGLDisplay dpy,
403 EGLContext ctx,
404 EGLenum target,
405 EGLClientBuffer buffer,
406 const EGLint* attrib_list) {
407 GL_SERVICE_LOG("eglCreateImageKHR"
408 << "(" << dpy << ", " << ctx << ", " << target << ", "
409 << buffer << ", " << static_cast<const void*>(attrib_list)
410 << ")");
411 DCHECK(g_driver_egl.debug_fn.eglCreateImageKHRFn != nullptr);
412 EGLImageKHR result = g_driver_egl.debug_fn.eglCreateImageKHRFn(
413 dpy, ctx, target, buffer, attrib_list);
414 GL_SERVICE_LOG("GL_RESULT: " << result);
415 return result;
416 }
417
418 static EGLSurface GL_BINDING_CALL
419 Debug_eglCreatePbufferFromClientBuffer(EGLDisplay dpy,
420 EGLenum buftype,
421 void* buffer,
422 EGLConfig config,
423 const EGLint* attrib_list) {
424 GL_SERVICE_LOG("eglCreatePbufferFromClientBuffer"
425 << "(" << dpy << ", " << buftype << ", "
426 << static_cast<const void*>(buffer) << ", " << config << ", "
427 << static_cast<const void*>(attrib_list) << ")");
428 DCHECK(g_driver_egl.debug_fn.eglCreatePbufferFromClientBufferFn != nullptr);
429 EGLSurface result = g_driver_egl.debug_fn.eglCreatePbufferFromClientBufferFn(
430 dpy, buftype, buffer, config, attrib_list);
431 GL_SERVICE_LOG("GL_RESULT: " << result);
432 return result;
433 }
434
435 static EGLSurface GL_BINDING_CALL
436 Debug_eglCreatePbufferSurface(EGLDisplay dpy,
437 EGLConfig config,
438 const EGLint* attrib_list) {
439 GL_SERVICE_LOG("eglCreatePbufferSurface"
440 << "(" << dpy << ", " << config << ", "
441 << static_cast<const void*>(attrib_list) << ")");
442 DCHECK(g_driver_egl.debug_fn.eglCreatePbufferSurfaceFn != nullptr);
443 EGLSurface result =
444 g_driver_egl.debug_fn.eglCreatePbufferSurfaceFn(dpy, config, attrib_list);
445 GL_SERVICE_LOG("GL_RESULT: " << result);
446 return result;
447 }
448
449 static EGLSurface GL_BINDING_CALL
450 Debug_eglCreatePixmapSurface(EGLDisplay dpy,
451 EGLConfig config,
452 EGLNativePixmapType pixmap,
453 const EGLint* attrib_list) {
454 GL_SERVICE_LOG("eglCreatePixmapSurface"
455 << "(" << dpy << ", " << config << ", " << pixmap << ", "
456 << static_cast<const void*>(attrib_list) << ")");
457 DCHECK(g_driver_egl.debug_fn.eglCreatePixmapSurfaceFn != nullptr);
458 EGLSurface result = g_driver_egl.debug_fn.eglCreatePixmapSurfaceFn(
459 dpy, config, pixmap, attrib_list);
460 GL_SERVICE_LOG("GL_RESULT: " << result);
461 return result;
462 }
463
464 static EGLStreamKHR GL_BINDING_CALL
465 Debug_eglCreateStreamKHR(EGLDisplay dpy, const EGLint* attrib_list) {
466 GL_SERVICE_LOG("eglCreateStreamKHR"
467 << "(" << dpy << ", " << static_cast<const void*>(attrib_list)
468 << ")");
469 DCHECK(g_driver_egl.debug_fn.eglCreateStreamKHRFn != nullptr);
470 EGLStreamKHR result =
471 g_driver_egl.debug_fn.eglCreateStreamKHRFn(dpy, attrib_list);
472 GL_SERVICE_LOG("GL_RESULT: " << result);
473 return result;
474 }
475
476 static EGLBoolean GL_BINDING_CALL
477 Debug_eglCreateStreamProducerD3DTextureNV12ANGLE(EGLDisplay dpy,
478 EGLStreamKHR stream,
479 EGLAttrib* attrib_list) {
480 GL_SERVICE_LOG("eglCreateStreamProducerD3DTextureNV12ANGLE"
481 << "(" << dpy << ", " << stream << ", "
482 << static_cast<const void*>(attrib_list) << ")");
483 DCHECK(g_driver_egl.debug_fn.eglCreateStreamProducerD3DTextureNV12ANGLEFn !=
484 nullptr);
485 EGLBoolean result =
486 g_driver_egl.debug_fn.eglCreateStreamProducerD3DTextureNV12ANGLEFn(
487 dpy, stream, attrib_list);
488 GL_SERVICE_LOG("GL_RESULT: " << result);
489 return result;
490 }
491
492 static EGLSyncKHR GL_BINDING_CALL
493 Debug_eglCreateSyncKHR(EGLDisplay dpy,
494 EGLenum type,
495 const EGLint* attrib_list) {
496 GL_SERVICE_LOG("eglCreateSyncKHR"
497 << "(" << dpy << ", " << type << ", "
498 << static_cast<const void*>(attrib_list) << ")");
499 DCHECK(g_driver_egl.debug_fn.eglCreateSyncKHRFn != nullptr);
500 EGLSyncKHR result =
501 g_driver_egl.debug_fn.eglCreateSyncKHRFn(dpy, type, attrib_list);
502 GL_SERVICE_LOG("GL_RESULT: " << result);
503 return result;
504 }
505
506 static EGLSurface GL_BINDING_CALL
507 Debug_eglCreateWindowSurface(EGLDisplay dpy,
508 EGLConfig config,
509 EGLNativeWindowType win,
510 const EGLint* attrib_list) {
511 GL_SERVICE_LOG("eglCreateWindowSurface"
512 << "(" << dpy << ", " << config << ", " << win << ", "
513 << static_cast<const void*>(attrib_list) << ")");
514 DCHECK(g_driver_egl.debug_fn.eglCreateWindowSurfaceFn != nullptr);
515 EGLSurface result = g_driver_egl.debug_fn.eglCreateWindowSurfaceFn(
516 dpy, config, win, attrib_list);
517 GL_SERVICE_LOG("GL_RESULT: " << result);
518 return result;
519 }
520
521 static EGLBoolean GL_BINDING_CALL Debug_eglDestroyContext(EGLDisplay dpy,
522 EGLContext ctx) {
523 GL_SERVICE_LOG("eglDestroyContext"
524 << "(" << dpy << ", " << ctx << ")");
525 DCHECK(g_driver_egl.debug_fn.eglDestroyContextFn != nullptr);
526 EGLBoolean result = g_driver_egl.debug_fn.eglDestroyContextFn(dpy, ctx);
527 GL_SERVICE_LOG("GL_RESULT: " << result);
528 return result;
529 }
530
531 static EGLBoolean GL_BINDING_CALL Debug_eglDestroyImageKHR(EGLDisplay dpy,
532 EGLImageKHR image) {
533 GL_SERVICE_LOG("eglDestroyImageKHR"
534 << "(" << dpy << ", " << image << ")");
535 DCHECK(g_driver_egl.debug_fn.eglDestroyImageKHRFn != nullptr);
536 EGLBoolean result = g_driver_egl.debug_fn.eglDestroyImageKHRFn(dpy, image);
537 GL_SERVICE_LOG("GL_RESULT: " << result);
538 return result;
539 }
540
541 static EGLBoolean GL_BINDING_CALL
542 Debug_eglDestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream) {
543 GL_SERVICE_LOG("eglDestroyStreamKHR"
544 << "(" << dpy << ", " << stream << ")");
545 DCHECK(g_driver_egl.debug_fn.eglDestroyStreamKHRFn != nullptr);
546 EGLBoolean result = g_driver_egl.debug_fn.eglDestroyStreamKHRFn(dpy, stream);
547 GL_SERVICE_LOG("GL_RESULT: " << result);
548 return result;
549 }
550
551 static EGLBoolean GL_BINDING_CALL Debug_eglDestroySurface(EGLDisplay dpy,
552 EGLSurface surface) {
553 GL_SERVICE_LOG("eglDestroySurface"
554 << "(" << dpy << ", " << surface << ")");
555 DCHECK(g_driver_egl.debug_fn.eglDestroySurfaceFn != nullptr);
556 EGLBoolean result = g_driver_egl.debug_fn.eglDestroySurfaceFn(dpy, surface);
557 GL_SERVICE_LOG("GL_RESULT: " << result);
558 return result;
559 }
560
561 static EGLBoolean GL_BINDING_CALL Debug_eglDestroySyncKHR(EGLDisplay dpy,
562 EGLSyncKHR sync) {
563 GL_SERVICE_LOG("eglDestroySyncKHR"
564 << "(" << dpy << ", " << sync << ")");
565 DCHECK(g_driver_egl.debug_fn.eglDestroySyncKHRFn != nullptr);
566 EGLBoolean result = g_driver_egl.debug_fn.eglDestroySyncKHRFn(dpy, sync);
567 GL_SERVICE_LOG("GL_RESULT: " << result);
568 return result;
569 }
570
571 static EGLBoolean GL_BINDING_CALL Debug_eglGetConfigAttrib(EGLDisplay dpy,
572 EGLConfig config,
573 EGLint attribute,
574 EGLint* value) {
575 GL_SERVICE_LOG("eglGetConfigAttrib"
576 << "(" << dpy << ", " << config << ", " << attribute << ", "
577 << static_cast<const void*>(value) << ")");
578 DCHECK(g_driver_egl.debug_fn.eglGetConfigAttribFn != nullptr);
579 EGLBoolean result =
580 g_driver_egl.debug_fn.eglGetConfigAttribFn(dpy, config, attribute, value);
581 GL_SERVICE_LOG("GL_RESULT: " << result);
582 return result;
583 }
584
585 static EGLBoolean GL_BINDING_CALL Debug_eglGetConfigs(EGLDisplay dpy,
586 EGLConfig* configs,
587 EGLint config_size,
588 EGLint* num_config) {
589 GL_SERVICE_LOG("eglGetConfigs"
590 << "(" << dpy << ", " << static_cast<const void*>(configs)
591 << ", " << config_size << ", "
592 << static_cast<const void*>(num_config) << ")");
593 DCHECK(g_driver_egl.debug_fn.eglGetConfigsFn != nullptr);
594 EGLBoolean result = g_driver_egl.debug_fn.eglGetConfigsFn(
595 dpy, configs, config_size, num_config);
596 GL_SERVICE_LOG("GL_RESULT: " << result);
597 return result;
598 }
599
600 static EGLContext GL_BINDING_CALL Debug_eglGetCurrentContext(void) {
601 GL_SERVICE_LOG("eglGetCurrentContext"
602 << "("
603 << ")");
604 DCHECK(g_driver_egl.debug_fn.eglGetCurrentContextFn != nullptr);
605 EGLContext result = g_driver_egl.debug_fn.eglGetCurrentContextFn();
606 GL_SERVICE_LOG("GL_RESULT: " << result);
607 return result;
608 }
609
610 static EGLDisplay GL_BINDING_CALL Debug_eglGetCurrentDisplay(void) {
611 GL_SERVICE_LOG("eglGetCurrentDisplay"
612 << "("
613 << ")");
614 DCHECK(g_driver_egl.debug_fn.eglGetCurrentDisplayFn != nullptr);
615 EGLDisplay result = g_driver_egl.debug_fn.eglGetCurrentDisplayFn();
616 GL_SERVICE_LOG("GL_RESULT: " << result);
617 return result;
618 }
619
620 static EGLSurface GL_BINDING_CALL Debug_eglGetCurrentSurface(EGLint readdraw) {
621 GL_SERVICE_LOG("eglGetCurrentSurface"
622 << "(" << readdraw << ")");
623 DCHECK(g_driver_egl.debug_fn.eglGetCurrentSurfaceFn != nullptr);
624 EGLSurface result = g_driver_egl.debug_fn.eglGetCurrentSurfaceFn(readdraw);
625 GL_SERVICE_LOG("GL_RESULT: " << result);
626 return result;
627 }
628
629 static EGLDisplay GL_BINDING_CALL
630 Debug_eglGetDisplay(EGLNativeDisplayType display_id) {
631 GL_SERVICE_LOG("eglGetDisplay"
632 << "(" << display_id << ")");
633 DCHECK(g_driver_egl.debug_fn.eglGetDisplayFn != nullptr);
634 EGLDisplay result = g_driver_egl.debug_fn.eglGetDisplayFn(display_id);
635 GL_SERVICE_LOG("GL_RESULT: " << result);
636 return result;
637 }
638
639 static EGLint GL_BINDING_CALL Debug_eglGetError(void) {
640 GL_SERVICE_LOG("eglGetError"
641 << "("
642 << ")");
643 DCHECK(g_driver_egl.debug_fn.eglGetErrorFn != nullptr);
644 EGLint result = g_driver_egl.debug_fn.eglGetErrorFn();
645 GL_SERVICE_LOG("GL_RESULT: " << result);
646 return result;
647 }
648
649 static EGLDisplay GL_BINDING_CALL
650 Debug_eglGetPlatformDisplayEXT(EGLenum platform,
651 void* native_display,
652 const EGLint* attrib_list) {
653 GL_SERVICE_LOG("eglGetPlatformDisplayEXT"
654 << "(" << platform << ", "
655 << static_cast<const void*>(native_display) << ", "
656 << static_cast<const void*>(attrib_list) << ")");
657 DCHECK(g_driver_egl.debug_fn.eglGetPlatformDisplayEXTFn != nullptr);
658 EGLDisplay result = g_driver_egl.debug_fn.eglGetPlatformDisplayEXTFn(
659 platform, native_display, attrib_list);
660 GL_SERVICE_LOG("GL_RESULT: " << result);
661 return result;
662 }
663
664 static __eglMustCastToProperFunctionPointerType GL_BINDING_CALL
665 Debug_eglGetProcAddress(const char* procname) {
666 GL_SERVICE_LOG("eglGetProcAddress"
667 << "(" << procname << ")");
668 DCHECK(g_driver_egl.debug_fn.eglGetProcAddressFn != nullptr);
669 __eglMustCastToProperFunctionPointerType result =
670 g_driver_egl.debug_fn.eglGetProcAddressFn(procname);
671 GL_SERVICE_LOG("GL_RESULT: " << result);
672 return result;
673 }
674
675 static EGLBoolean GL_BINDING_CALL Debug_eglGetSyncAttribKHR(EGLDisplay dpy,
676 EGLSyncKHR sync,
677 EGLint attribute,
678 EGLint* value) {
679 GL_SERVICE_LOG("eglGetSyncAttribKHR"
680 << "(" << dpy << ", " << sync << ", " << attribute << ", "
681 << static_cast<const void*>(value) << ")");
682 DCHECK(g_driver_egl.debug_fn.eglGetSyncAttribKHRFn != nullptr);
683 EGLBoolean result =
684 g_driver_egl.debug_fn.eglGetSyncAttribKHRFn(dpy, sync, attribute, value);
685 GL_SERVICE_LOG("GL_RESULT: " << result);
686 return result;
687 }
688
689 static EGLBoolean GL_BINDING_CALL
690 Debug_eglGetSyncValuesCHROMIUM(EGLDisplay dpy,
691 EGLSurface surface,
692 EGLuint64CHROMIUM* ust,
693 EGLuint64CHROMIUM* msc,
694 EGLuint64CHROMIUM* sbc) {
695 GL_SERVICE_LOG("eglGetSyncValuesCHROMIUM"
696 << "(" << dpy << ", " << surface << ", "
697 << static_cast<const void*>(ust) << ", "
698 << static_cast<const void*>(msc) << ", "
699 << static_cast<const void*>(sbc) << ")");
700 DCHECK(g_driver_egl.debug_fn.eglGetSyncValuesCHROMIUMFn != nullptr);
701 EGLBoolean result = g_driver_egl.debug_fn.eglGetSyncValuesCHROMIUMFn(
702 dpy, surface, ust, msc, sbc);
703 GL_SERVICE_LOG("GL_RESULT: " << result);
704 return result;
705 }
706
707 static EGLBoolean GL_BINDING_CALL
708 Debug_eglImageFlushExternalEXT(EGLDisplay dpy,
709 EGLImageKHR image,
710 const EGLAttrib* attrib_list) {
711 GL_SERVICE_LOG("eglImageFlushExternalEXT"
712 << "(" << dpy << ", " << image << ", "
713 << static_cast<const void*>(attrib_list) << ")");
714 DCHECK(g_driver_egl.debug_fn.eglImageFlushExternalEXTFn != nullptr);
715 EGLBoolean result =
716 g_driver_egl.debug_fn.eglImageFlushExternalEXTFn(dpy, image, attrib_list);
717 GL_SERVICE_LOG("GL_RESULT: " << result);
718 return result;
719 }
720
721 static EGLBoolean GL_BINDING_CALL Debug_eglInitialize(EGLDisplay dpy,
722 EGLint* major,
723 EGLint* minor) {
724 GL_SERVICE_LOG("eglInitialize"
725 << "(" << dpy << ", " << static_cast<const void*>(major)
726 << ", " << static_cast<const void*>(minor) << ")");
727 DCHECK(g_driver_egl.debug_fn.eglInitializeFn != nullptr);
728 EGLBoolean result = g_driver_egl.debug_fn.eglInitializeFn(dpy, major, minor);
729 GL_SERVICE_LOG("GL_RESULT: " << result);
730 return result;
731 }
732
733 static EGLBoolean GL_BINDING_CALL Debug_eglMakeCurrent(EGLDisplay dpy,
734 EGLSurface draw,
735 EGLSurface read,
736 EGLContext ctx) {
737 GL_SERVICE_LOG("eglMakeCurrent"
738 << "(" << dpy << ", " << draw << ", " << read << ", " << ctx
739 << ")");
740 DCHECK(g_driver_egl.debug_fn.eglMakeCurrentFn != nullptr);
741 EGLBoolean result =
742 g_driver_egl.debug_fn.eglMakeCurrentFn(dpy, draw, read, ctx);
743 GL_SERVICE_LOG("GL_RESULT: " << result);
744 return result;
745 }
746
747 static EGLBoolean GL_BINDING_CALL Debug_eglPostSubBufferNV(EGLDisplay dpy,
748 EGLSurface surface,
749 EGLint x,
750 EGLint y,
751 EGLint width,
752 EGLint height) {
753 GL_SERVICE_LOG("eglPostSubBufferNV"
754 << "(" << dpy << ", " << surface << ", " << x << ", " << y
755 << ", " << width << ", " << height << ")");
756 DCHECK(g_driver_egl.debug_fn.eglPostSubBufferNVFn != nullptr);
757 EGLBoolean result = g_driver_egl.debug_fn.eglPostSubBufferNVFn(
758 dpy, surface, x, y, width, height);
759 GL_SERVICE_LOG("GL_RESULT: " << result);
760 return result;
761 }
762
763 static EGLenum GL_BINDING_CALL Debug_eglQueryAPI(void) {
764 GL_SERVICE_LOG("eglQueryAPI"
765 << "("
766 << ")");
767 DCHECK(g_driver_egl.debug_fn.eglQueryAPIFn != nullptr);
768 EGLenum result = g_driver_egl.debug_fn.eglQueryAPIFn();
769 GL_SERVICE_LOG("GL_RESULT: " << result);
770 return result;
771 }
772
773 static EGLBoolean GL_BINDING_CALL Debug_eglQueryContext(EGLDisplay dpy,
774 EGLContext ctx,
775 EGLint attribute,
776 EGLint* value) {
777 GL_SERVICE_LOG("eglQueryContext"
778 << "(" << dpy << ", " << ctx << ", " << attribute << ", "
779 << static_cast<const void*>(value) << ")");
780 DCHECK(g_driver_egl.debug_fn.eglQueryContextFn != nullptr);
781 EGLBoolean result =
782 g_driver_egl.debug_fn.eglQueryContextFn(dpy, ctx, attribute, value);
783 GL_SERVICE_LOG("GL_RESULT: " << result);
784 return result;
785 }
786
787 static EGLBoolean GL_BINDING_CALL Debug_eglQueryStreamKHR(EGLDisplay dpy,
788 EGLStreamKHR stream,
789 EGLenum attribute,
790 EGLint* value) {
791 GL_SERVICE_LOG("eglQueryStreamKHR"
792 << "(" << dpy << ", " << stream << ", " << attribute << ", "
793 << static_cast<const void*>(value) << ")");
794 DCHECK(g_driver_egl.debug_fn.eglQueryStreamKHRFn != nullptr);
795 EGLBoolean result =
796 g_driver_egl.debug_fn.eglQueryStreamKHRFn(dpy, stream, attribute, value);
797 GL_SERVICE_LOG("GL_RESULT: " << result);
798 return result;
799 }
800
801 static EGLBoolean GL_BINDING_CALL
802 Debug_eglQueryStreamu64KHR(EGLDisplay dpy,
803 EGLStreamKHR stream,
804 EGLenum attribute,
805 EGLuint64KHR* value) {
806 GL_SERVICE_LOG("eglQueryStreamu64KHR"
807 << "(" << dpy << ", " << stream << ", " << attribute << ", "
808 << static_cast<const void*>(value) << ")");
809 DCHECK(g_driver_egl.debug_fn.eglQueryStreamu64KHRFn != nullptr);
810 EGLBoolean result = g_driver_egl.debug_fn.eglQueryStreamu64KHRFn(
811 dpy, stream, attribute, value);
812 GL_SERVICE_LOG("GL_RESULT: " << result);
813 return result;
814 }
815
816 static const char* GL_BINDING_CALL Debug_eglQueryString(EGLDisplay dpy,
817 EGLint name) {
818 GL_SERVICE_LOG("eglQueryString"
819 << "(" << dpy << ", " << name << ")");
820 DCHECK(g_driver_egl.debug_fn.eglQueryStringFn != nullptr);
821 const char* result = g_driver_egl.debug_fn.eglQueryStringFn(dpy, name);
822 GL_SERVICE_LOG("GL_RESULT: " << result);
823 return result;
824 }
825
826 static EGLBoolean GL_BINDING_CALL Debug_eglQuerySurface(EGLDisplay dpy,
827 EGLSurface surface,
828 EGLint attribute,
829 EGLint* value) {
830 GL_SERVICE_LOG("eglQuerySurface"
831 << "(" << dpy << ", " << surface << ", " << attribute << ", "
832 << static_cast<const void*>(value) << ")");
833 DCHECK(g_driver_egl.debug_fn.eglQuerySurfaceFn != nullptr);
834 EGLBoolean result =
835 g_driver_egl.debug_fn.eglQuerySurfaceFn(dpy, surface, attribute, value);
836 GL_SERVICE_LOG("GL_RESULT: " << result);
837 return result;
838 }
839
840 static EGLBoolean GL_BINDING_CALL
841 Debug_eglQuerySurfacePointerANGLE(EGLDisplay dpy,
842 EGLSurface surface,
843 EGLint attribute,
844 void** value) {
845 GL_SERVICE_LOG("eglQuerySurfacePointerANGLE"
846 << "(" << dpy << ", " << surface << ", " << attribute << ", "
847 << value << ")");
848 DCHECK(g_driver_egl.debug_fn.eglQuerySurfacePointerANGLEFn != nullptr);
849 EGLBoolean result = g_driver_egl.debug_fn.eglQuerySurfacePointerANGLEFn(
850 dpy, surface, attribute, value);
851 GL_SERVICE_LOG("GL_RESULT: " << result);
852 return result;
853 }
854
855 static EGLBoolean GL_BINDING_CALL Debug_eglReleaseTexImage(EGLDisplay dpy,
856 EGLSurface surface,
857 EGLint buffer) {
858 GL_SERVICE_LOG("eglReleaseTexImage"
859 << "(" << dpy << ", " << surface << ", " << buffer << ")");
860 DCHECK(g_driver_egl.debug_fn.eglReleaseTexImageFn != nullptr);
861 EGLBoolean result =
862 g_driver_egl.debug_fn.eglReleaseTexImageFn(dpy, surface, buffer);
863 GL_SERVICE_LOG("GL_RESULT: " << result);
864 return result;
865 }
866
867 static EGLBoolean GL_BINDING_CALL Debug_eglReleaseThread(void) {
868 GL_SERVICE_LOG("eglReleaseThread"
869 << "("
870 << ")");
871 DCHECK(g_driver_egl.debug_fn.eglReleaseThreadFn != nullptr);
872 EGLBoolean result = g_driver_egl.debug_fn.eglReleaseThreadFn();
873 GL_SERVICE_LOG("GL_RESULT: " << result);
874 return result;
875 }
876
877 static EGLBoolean GL_BINDING_CALL Debug_eglStreamAttribKHR(EGLDisplay dpy,
878 EGLStreamKHR stream,
879 EGLenum attribute,
880 EGLint value) {
881 GL_SERVICE_LOG("eglStreamAttribKHR"
882 << "(" << dpy << ", " << stream << ", " << attribute << ", "
883 << value << ")");
884 DCHECK(g_driver_egl.debug_fn.eglStreamAttribKHRFn != nullptr);
885 EGLBoolean result =
886 g_driver_egl.debug_fn.eglStreamAttribKHRFn(dpy, stream, attribute, value);
887 GL_SERVICE_LOG("GL_RESULT: " << result);
888 return result;
889 }
890
891 static EGLBoolean GL_BINDING_CALL
892 Debug_eglStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream) {
893 GL_SERVICE_LOG("eglStreamConsumerAcquireKHR"
894 << "(" << dpy << ", " << stream << ")");
895 DCHECK(g_driver_egl.debug_fn.eglStreamConsumerAcquireKHRFn != nullptr);
896 EGLBoolean result =
897 g_driver_egl.debug_fn.eglStreamConsumerAcquireKHRFn(dpy, stream);
898 GL_SERVICE_LOG("GL_RESULT: " << result);
899 return result;
900 }
901
902 static EGLBoolean GL_BINDING_CALL
903 Debug_eglStreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy,
904 EGLStreamKHR stream,
905 EGLAttrib* attrib_list) {
906 GL_SERVICE_LOG("eglStreamConsumerGLTextureExternalAttribsNV"
907 << "(" << dpy << ", " << stream << ", "
908 << static_cast<const void*>(attrib_list) << ")");
909 DCHECK(g_driver_egl.debug_fn.eglStreamConsumerGLTextureExternalAttribsNVFn !=
910 nullptr);
911 EGLBoolean result =
912 g_driver_egl.debug_fn.eglStreamConsumerGLTextureExternalAttribsNVFn(
913 dpy, stream, attrib_list);
914 GL_SERVICE_LOG("GL_RESULT: " << result);
915 return result;
916 }
917
918 static EGLBoolean GL_BINDING_CALL
919 Debug_eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy,
920 EGLStreamKHR stream) {
921 GL_SERVICE_LOG("eglStreamConsumerGLTextureExternalKHR"
922 << "(" << dpy << ", " << stream << ")");
923 DCHECK(g_driver_egl.debug_fn.eglStreamConsumerGLTextureExternalKHRFn !=
924 nullptr);
925 EGLBoolean result =
926 g_driver_egl.debug_fn.eglStreamConsumerGLTextureExternalKHRFn(dpy,
927 stream);
928 GL_SERVICE_LOG("GL_RESULT: " << result);
929 return result;
930 }
931
932 static EGLBoolean GL_BINDING_CALL
933 Debug_eglStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream) {
934 GL_SERVICE_LOG("eglStreamConsumerReleaseKHR"
935 << "(" << dpy << ", " << stream << ")");
936 DCHECK(g_driver_egl.debug_fn.eglStreamConsumerReleaseKHRFn != nullptr);
937 EGLBoolean result =
938 g_driver_egl.debug_fn.eglStreamConsumerReleaseKHRFn(dpy, stream);
939 GL_SERVICE_LOG("GL_RESULT: " << result);
940 return result;
941 }
942
943 static EGLBoolean GL_BINDING_CALL
944 Debug_eglStreamPostD3DTextureNV12ANGLE(EGLDisplay dpy,
945 EGLStreamKHR stream,
946 void* texture,
947 const EGLAttrib* attrib_list) {
948 GL_SERVICE_LOG("eglStreamPostD3DTextureNV12ANGLE"
949 << "(" << dpy << ", " << stream << ", "
950 << static_cast<const void*>(texture) << ", "
951 << static_cast<const void*>(attrib_list) << ")");
952 DCHECK(g_driver_egl.debug_fn.eglStreamPostD3DTextureNV12ANGLEFn != nullptr);
953 EGLBoolean result = g_driver_egl.debug_fn.eglStreamPostD3DTextureNV12ANGLEFn(
954 dpy, stream, texture, attrib_list);
955 GL_SERVICE_LOG("GL_RESULT: " << result);
956 return result;
957 }
958
959 static EGLBoolean GL_BINDING_CALL Debug_eglSurfaceAttrib(EGLDisplay dpy,
960 EGLSurface surface,
961 EGLint attribute,
962 EGLint value) {
963 GL_SERVICE_LOG("eglSurfaceAttrib"
964 << "(" << dpy << ", " << surface << ", " << attribute << ", "
965 << value << ")");
966 DCHECK(g_driver_egl.debug_fn.eglSurfaceAttribFn != nullptr);
967 EGLBoolean result =
968 g_driver_egl.debug_fn.eglSurfaceAttribFn(dpy, surface, attribute, value);
969 GL_SERVICE_LOG("GL_RESULT: " << result);
970 return result;
971 }
972
973 static EGLBoolean GL_BINDING_CALL Debug_eglSwapBuffers(EGLDisplay dpy,
974 EGLSurface surface) {
975 GL_SERVICE_LOG("eglSwapBuffers"
976 << "(" << dpy << ", " << surface << ")");
977 DCHECK(g_driver_egl.debug_fn.eglSwapBuffersFn != nullptr);
978 EGLBoolean result = g_driver_egl.debug_fn.eglSwapBuffersFn(dpy, surface);
979 GL_SERVICE_LOG("GL_RESULT: " << result);
980 return result;
981 }
982
983 static EGLBoolean GL_BINDING_CALL
984 Debug_eglSwapBuffersWithDamageKHR(EGLDisplay dpy,
985 EGLSurface surface,
986 EGLint* rects,
987 EGLint n_rects) {
988 GL_SERVICE_LOG("eglSwapBuffersWithDamageKHR"
989 << "(" << dpy << ", " << surface << ", "
990 << static_cast<const void*>(rects) << ", " << n_rects << ")");
991 DCHECK(g_driver_egl.debug_fn.eglSwapBuffersWithDamageKHRFn != nullptr);
992 EGLBoolean result = g_driver_egl.debug_fn.eglSwapBuffersWithDamageKHRFn(
993 dpy, surface, rects, n_rects);
994 GL_SERVICE_LOG("GL_RESULT: " << result);
995 return result;
996 }
997
998 static EGLBoolean GL_BINDING_CALL Debug_eglSwapInterval(EGLDisplay dpy,
999 EGLint interval) {
1000 GL_SERVICE_LOG("eglSwapInterval"
1001 << "(" << dpy << ", " << interval << ")");
1002 DCHECK(g_driver_egl.debug_fn.eglSwapIntervalFn != nullptr);
1003 EGLBoolean result = g_driver_egl.debug_fn.eglSwapIntervalFn(dpy, interval);
1004 GL_SERVICE_LOG("GL_RESULT: " << result);
1005 return result;
1006 }
1007
1008 static EGLBoolean GL_BINDING_CALL Debug_eglTerminate(EGLDisplay dpy) {
1009 GL_SERVICE_LOG("eglTerminate"
1010 << "(" << dpy << ")");
1011 DCHECK(g_driver_egl.debug_fn.eglTerminateFn != nullptr);
1012 EGLBoolean result = g_driver_egl.debug_fn.eglTerminateFn(dpy);
1013 GL_SERVICE_LOG("GL_RESULT: " << result);
1014 return result;
1015 }
1016
1017 static EGLBoolean GL_BINDING_CALL Debug_eglWaitClient(void) {
1018 GL_SERVICE_LOG("eglWaitClient"
1019 << "("
1020 << ")");
1021 DCHECK(g_driver_egl.debug_fn.eglWaitClientFn != nullptr);
1022 EGLBoolean result = g_driver_egl.debug_fn.eglWaitClientFn();
1023 GL_SERVICE_LOG("GL_RESULT: " << result);
1024 return result;
1025 }
1026
1027 static EGLBoolean GL_BINDING_CALL Debug_eglWaitGL(void) {
1028 GL_SERVICE_LOG("eglWaitGL"
1029 << "("
1030 << ")");
1031 DCHECK(g_driver_egl.debug_fn.eglWaitGLFn != nullptr);
1032 EGLBoolean result = g_driver_egl.debug_fn.eglWaitGLFn();
1033 GL_SERVICE_LOG("GL_RESULT: " << result);
1034 return result;
1035 }
1036
1037 static EGLBoolean GL_BINDING_CALL Debug_eglWaitNative(EGLint engine) {
1038 GL_SERVICE_LOG("eglWaitNative"
1039 << "(" << engine << ")");
1040 DCHECK(g_driver_egl.debug_fn.eglWaitNativeFn != nullptr);
1041 EGLBoolean result = g_driver_egl.debug_fn.eglWaitNativeFn(engine);
1042 GL_SERVICE_LOG("GL_RESULT: " << result);
1043 return result;
1044 }
1045
1046 static EGLint GL_BINDING_CALL Debug_eglWaitSyncKHR(EGLDisplay dpy,
1047 EGLSyncKHR sync,
1048 EGLint flags) {
1049 GL_SERVICE_LOG("eglWaitSyncKHR"
1050 << "(" << dpy << ", " << sync << ", " << flags << ")");
1051 DCHECK(g_driver_egl.debug_fn.eglWaitSyncKHRFn != nullptr);
1052 EGLint result = g_driver_egl.debug_fn.eglWaitSyncKHRFn(dpy, sync, flags);
1053 GL_SERVICE_LOG("GL_RESULT: " << result);
1054 return result;
1055 }
1056 } // extern "C"
1057
1058 void DriverEGL::InitializeDebugBindings() {
1059 if (!debug_fn.eglBindAPIFn) {
1060 debug_fn.eglBindAPIFn = fn.eglBindAPIFn;
1061 fn.eglBindAPIFn = Debug_eglBindAPI;
1062 }
1063 if (!debug_fn.eglBindTexImageFn) {
1064 debug_fn.eglBindTexImageFn = fn.eglBindTexImageFn;
1065 fn.eglBindTexImageFn = Debug_eglBindTexImage;
1066 }
1067 if (!debug_fn.eglChooseConfigFn) {
1068 debug_fn.eglChooseConfigFn = fn.eglChooseConfigFn;
1069 fn.eglChooseConfigFn = Debug_eglChooseConfig;
1070 }
1071 if (!debug_fn.eglClientWaitSyncKHRFn) {
1072 debug_fn.eglClientWaitSyncKHRFn = fn.eglClientWaitSyncKHRFn;
1073 fn.eglClientWaitSyncKHRFn = Debug_eglClientWaitSyncKHR;
1074 }
1075 if (!debug_fn.eglCopyBuffersFn) {
1076 debug_fn.eglCopyBuffersFn = fn.eglCopyBuffersFn;
1077 fn.eglCopyBuffersFn = Debug_eglCopyBuffers;
1078 }
1079 if (!debug_fn.eglCreateContextFn) {
1080 debug_fn.eglCreateContextFn = fn.eglCreateContextFn;
1081 fn.eglCreateContextFn = Debug_eglCreateContext;
1082 }
1083 if (!debug_fn.eglCreateImageKHRFn) {
1084 debug_fn.eglCreateImageKHRFn = fn.eglCreateImageKHRFn;
1085 fn.eglCreateImageKHRFn = Debug_eglCreateImageKHR;
1086 }
1087 if (!debug_fn.eglCreatePbufferFromClientBufferFn) {
1088 debug_fn.eglCreatePbufferFromClientBufferFn =
1089 fn.eglCreatePbufferFromClientBufferFn;
1090 fn.eglCreatePbufferFromClientBufferFn =
1091 Debug_eglCreatePbufferFromClientBuffer;
1092 }
1093 if (!debug_fn.eglCreatePbufferSurfaceFn) {
1094 debug_fn.eglCreatePbufferSurfaceFn = fn.eglCreatePbufferSurfaceFn;
1095 fn.eglCreatePbufferSurfaceFn = Debug_eglCreatePbufferSurface;
1096 }
1097 if (!debug_fn.eglCreatePixmapSurfaceFn) {
1098 debug_fn.eglCreatePixmapSurfaceFn = fn.eglCreatePixmapSurfaceFn;
1099 fn.eglCreatePixmapSurfaceFn = Debug_eglCreatePixmapSurface;
1100 }
1101 if (!debug_fn.eglCreateStreamKHRFn) {
1102 debug_fn.eglCreateStreamKHRFn = fn.eglCreateStreamKHRFn;
1103 fn.eglCreateStreamKHRFn = Debug_eglCreateStreamKHR;
1104 }
1105 if (!debug_fn.eglCreateStreamProducerD3DTextureNV12ANGLEFn) {
1106 debug_fn.eglCreateStreamProducerD3DTextureNV12ANGLEFn =
1107 fn.eglCreateStreamProducerD3DTextureNV12ANGLEFn;
1108 fn.eglCreateStreamProducerD3DTextureNV12ANGLEFn =
1109 Debug_eglCreateStreamProducerD3DTextureNV12ANGLE;
1110 }
1111 if (!debug_fn.eglCreateSyncKHRFn) {
1112 debug_fn.eglCreateSyncKHRFn = fn.eglCreateSyncKHRFn;
1113 fn.eglCreateSyncKHRFn = Debug_eglCreateSyncKHR;
1114 }
1115 if (!debug_fn.eglCreateWindowSurfaceFn) {
1116 debug_fn.eglCreateWindowSurfaceFn = fn.eglCreateWindowSurfaceFn;
1117 fn.eglCreateWindowSurfaceFn = Debug_eglCreateWindowSurface;
1118 }
1119 if (!debug_fn.eglDestroyContextFn) {
1120 debug_fn.eglDestroyContextFn = fn.eglDestroyContextFn;
1121 fn.eglDestroyContextFn = Debug_eglDestroyContext;
1122 }
1123 if (!debug_fn.eglDestroyImageKHRFn) {
1124 debug_fn.eglDestroyImageKHRFn = fn.eglDestroyImageKHRFn;
1125 fn.eglDestroyImageKHRFn = Debug_eglDestroyImageKHR;
1126 }
1127 if (!debug_fn.eglDestroyStreamKHRFn) {
1128 debug_fn.eglDestroyStreamKHRFn = fn.eglDestroyStreamKHRFn;
1129 fn.eglDestroyStreamKHRFn = Debug_eglDestroyStreamKHR;
1130 }
1131 if (!debug_fn.eglDestroySurfaceFn) {
1132 debug_fn.eglDestroySurfaceFn = fn.eglDestroySurfaceFn;
1133 fn.eglDestroySurfaceFn = Debug_eglDestroySurface;
1134 }
1135 if (!debug_fn.eglDestroySyncKHRFn) {
1136 debug_fn.eglDestroySyncKHRFn = fn.eglDestroySyncKHRFn;
1137 fn.eglDestroySyncKHRFn = Debug_eglDestroySyncKHR;
1138 }
1139 if (!debug_fn.eglGetConfigAttribFn) {
1140 debug_fn.eglGetConfigAttribFn = fn.eglGetConfigAttribFn;
1141 fn.eglGetConfigAttribFn = Debug_eglGetConfigAttrib;
1142 }
1143 if (!debug_fn.eglGetConfigsFn) {
1144 debug_fn.eglGetConfigsFn = fn.eglGetConfigsFn;
1145 fn.eglGetConfigsFn = Debug_eglGetConfigs;
1146 }
1147 if (!debug_fn.eglGetCurrentContextFn) {
1148 debug_fn.eglGetCurrentContextFn = fn.eglGetCurrentContextFn;
1149 fn.eglGetCurrentContextFn = Debug_eglGetCurrentContext;
1150 }
1151 if (!debug_fn.eglGetCurrentDisplayFn) {
1152 debug_fn.eglGetCurrentDisplayFn = fn.eglGetCurrentDisplayFn;
1153 fn.eglGetCurrentDisplayFn = Debug_eglGetCurrentDisplay;
1154 }
1155 if (!debug_fn.eglGetCurrentSurfaceFn) {
1156 debug_fn.eglGetCurrentSurfaceFn = fn.eglGetCurrentSurfaceFn;
1157 fn.eglGetCurrentSurfaceFn = Debug_eglGetCurrentSurface;
1158 }
1159 if (!debug_fn.eglGetDisplayFn) {
1160 debug_fn.eglGetDisplayFn = fn.eglGetDisplayFn;
1161 fn.eglGetDisplayFn = Debug_eglGetDisplay;
1162 }
1163 if (!debug_fn.eglGetErrorFn) {
1164 debug_fn.eglGetErrorFn = fn.eglGetErrorFn;
1165 fn.eglGetErrorFn = Debug_eglGetError;
1166 }
1167 if (!debug_fn.eglGetPlatformDisplayEXTFn) {
1168 debug_fn.eglGetPlatformDisplayEXTFn = fn.eglGetPlatformDisplayEXTFn;
1169 fn.eglGetPlatformDisplayEXTFn = Debug_eglGetPlatformDisplayEXT;
1170 }
1171 if (!debug_fn.eglGetProcAddressFn) {
1172 debug_fn.eglGetProcAddressFn = fn.eglGetProcAddressFn;
1173 fn.eglGetProcAddressFn = Debug_eglGetProcAddress;
1174 }
1175 if (!debug_fn.eglGetSyncAttribKHRFn) {
1176 debug_fn.eglGetSyncAttribKHRFn = fn.eglGetSyncAttribKHRFn;
1177 fn.eglGetSyncAttribKHRFn = Debug_eglGetSyncAttribKHR;
1178 }
1179 if (!debug_fn.eglGetSyncValuesCHROMIUMFn) {
1180 debug_fn.eglGetSyncValuesCHROMIUMFn = fn.eglGetSyncValuesCHROMIUMFn;
1181 fn.eglGetSyncValuesCHROMIUMFn = Debug_eglGetSyncValuesCHROMIUM;
1182 }
1183 if (!debug_fn.eglImageFlushExternalEXTFn) {
1184 debug_fn.eglImageFlushExternalEXTFn = fn.eglImageFlushExternalEXTFn;
1185 fn.eglImageFlushExternalEXTFn = Debug_eglImageFlushExternalEXT;
1186 }
1187 if (!debug_fn.eglInitializeFn) {
1188 debug_fn.eglInitializeFn = fn.eglInitializeFn;
1189 fn.eglInitializeFn = Debug_eglInitialize;
1190 }
1191 if (!debug_fn.eglMakeCurrentFn) {
1192 debug_fn.eglMakeCurrentFn = fn.eglMakeCurrentFn;
1193 fn.eglMakeCurrentFn = Debug_eglMakeCurrent;
1194 }
1195 if (!debug_fn.eglPostSubBufferNVFn) {
1196 debug_fn.eglPostSubBufferNVFn = fn.eglPostSubBufferNVFn;
1197 fn.eglPostSubBufferNVFn = Debug_eglPostSubBufferNV;
1198 }
1199 if (!debug_fn.eglQueryAPIFn) {
1200 debug_fn.eglQueryAPIFn = fn.eglQueryAPIFn;
1201 fn.eglQueryAPIFn = Debug_eglQueryAPI;
1202 }
1203 if (!debug_fn.eglQueryContextFn) {
1204 debug_fn.eglQueryContextFn = fn.eglQueryContextFn;
1205 fn.eglQueryContextFn = Debug_eglQueryContext;
1206 }
1207 if (!debug_fn.eglQueryStreamKHRFn) {
1208 debug_fn.eglQueryStreamKHRFn = fn.eglQueryStreamKHRFn;
1209 fn.eglQueryStreamKHRFn = Debug_eglQueryStreamKHR;
1210 }
1211 if (!debug_fn.eglQueryStreamu64KHRFn) {
1212 debug_fn.eglQueryStreamu64KHRFn = fn.eglQueryStreamu64KHRFn;
1213 fn.eglQueryStreamu64KHRFn = Debug_eglQueryStreamu64KHR;
1214 }
1215 if (!debug_fn.eglQueryStringFn) {
1216 debug_fn.eglQueryStringFn = fn.eglQueryStringFn;
1217 fn.eglQueryStringFn = Debug_eglQueryString;
1218 }
1219 if (!debug_fn.eglQuerySurfaceFn) {
1220 debug_fn.eglQuerySurfaceFn = fn.eglQuerySurfaceFn;
1221 fn.eglQuerySurfaceFn = Debug_eglQuerySurface;
1222 }
1223 if (!debug_fn.eglQuerySurfacePointerANGLEFn) {
1224 debug_fn.eglQuerySurfacePointerANGLEFn = fn.eglQuerySurfacePointerANGLEFn;
1225 fn.eglQuerySurfacePointerANGLEFn = Debug_eglQuerySurfacePointerANGLE;
1226 }
1227 if (!debug_fn.eglReleaseTexImageFn) {
1228 debug_fn.eglReleaseTexImageFn = fn.eglReleaseTexImageFn;
1229 fn.eglReleaseTexImageFn = Debug_eglReleaseTexImage;
1230 }
1231 if (!debug_fn.eglReleaseThreadFn) {
1232 debug_fn.eglReleaseThreadFn = fn.eglReleaseThreadFn;
1233 fn.eglReleaseThreadFn = Debug_eglReleaseThread;
1234 }
1235 if (!debug_fn.eglStreamAttribKHRFn) {
1236 debug_fn.eglStreamAttribKHRFn = fn.eglStreamAttribKHRFn;
1237 fn.eglStreamAttribKHRFn = Debug_eglStreamAttribKHR;
1238 }
1239 if (!debug_fn.eglStreamConsumerAcquireKHRFn) {
1240 debug_fn.eglStreamConsumerAcquireKHRFn = fn.eglStreamConsumerAcquireKHRFn;
1241 fn.eglStreamConsumerAcquireKHRFn = Debug_eglStreamConsumerAcquireKHR;
1242 }
1243 if (!debug_fn.eglStreamConsumerGLTextureExternalAttribsNVFn) {
1244 debug_fn.eglStreamConsumerGLTextureExternalAttribsNVFn =
1245 fn.eglStreamConsumerGLTextureExternalAttribsNVFn;
1246 fn.eglStreamConsumerGLTextureExternalAttribsNVFn =
1247 Debug_eglStreamConsumerGLTextureExternalAttribsNV;
1248 }
1249 if (!debug_fn.eglStreamConsumerGLTextureExternalKHRFn) {
1250 debug_fn.eglStreamConsumerGLTextureExternalKHRFn =
1251 fn.eglStreamConsumerGLTextureExternalKHRFn;
1252 fn.eglStreamConsumerGLTextureExternalKHRFn =
1253 Debug_eglStreamConsumerGLTextureExternalKHR;
1254 }
1255 if (!debug_fn.eglStreamConsumerReleaseKHRFn) {
1256 debug_fn.eglStreamConsumerReleaseKHRFn = fn.eglStreamConsumerReleaseKHRFn;
1257 fn.eglStreamConsumerReleaseKHRFn = Debug_eglStreamConsumerReleaseKHR;
1258 }
1259 if (!debug_fn.eglStreamPostD3DTextureNV12ANGLEFn) {
1260 debug_fn.eglStreamPostD3DTextureNV12ANGLEFn =
1261 fn.eglStreamPostD3DTextureNV12ANGLEFn;
1262 fn.eglStreamPostD3DTextureNV12ANGLEFn =
1263 Debug_eglStreamPostD3DTextureNV12ANGLE;
1264 }
1265 if (!debug_fn.eglSurfaceAttribFn) {
1266 debug_fn.eglSurfaceAttribFn = fn.eglSurfaceAttribFn;
1267 fn.eglSurfaceAttribFn = Debug_eglSurfaceAttrib;
1268 }
1269 if (!debug_fn.eglSwapBuffersFn) {
1270 debug_fn.eglSwapBuffersFn = fn.eglSwapBuffersFn;
1271 fn.eglSwapBuffersFn = Debug_eglSwapBuffers;
1272 }
1273 if (!debug_fn.eglSwapBuffersWithDamageKHRFn) {
1274 debug_fn.eglSwapBuffersWithDamageKHRFn = fn.eglSwapBuffersWithDamageKHRFn;
1275 fn.eglSwapBuffersWithDamageKHRFn = Debug_eglSwapBuffersWithDamageKHR;
1276 }
1277 if (!debug_fn.eglSwapIntervalFn) {
1278 debug_fn.eglSwapIntervalFn = fn.eglSwapIntervalFn;
1279 fn.eglSwapIntervalFn = Debug_eglSwapInterval;
1280 }
1281 if (!debug_fn.eglTerminateFn) {
1282 debug_fn.eglTerminateFn = fn.eglTerminateFn;
1283 fn.eglTerminateFn = Debug_eglTerminate;
1284 }
1285 if (!debug_fn.eglWaitClientFn) {
1286 debug_fn.eglWaitClientFn = fn.eglWaitClientFn;
1287 fn.eglWaitClientFn = Debug_eglWaitClient;
1288 }
1289 if (!debug_fn.eglWaitGLFn) {
1290 debug_fn.eglWaitGLFn = fn.eglWaitGLFn;
1291 fn.eglWaitGLFn = Debug_eglWaitGL;
1292 }
1293 if (!debug_fn.eglWaitNativeFn) {
1294 debug_fn.eglWaitNativeFn = fn.eglWaitNativeFn;
1295 fn.eglWaitNativeFn = Debug_eglWaitNative;
1296 }
1297 if (!debug_fn.eglWaitSyncKHRFn) {
1298 debug_fn.eglWaitSyncKHRFn = fn.eglWaitSyncKHRFn;
1299 fn.eglWaitSyncKHRFn = Debug_eglWaitSyncKHR;
1300 }
1301 g_debugBindingsInitialized = true;
1302 } 292 }
1303 293
1304 void DriverEGL::ClearBindings() { 294 void DriverEGL::ClearBindings() {
1305 memset(this, 0, sizeof(*this)); 295 memset(this, 0, sizeof(*this));
1306 } 296 }
1307 297
1308 EGLBoolean EGLApiBase::eglBindAPIFn(EGLenum api) { 298 EGLBoolean EGLApiBase::eglBindAPIFn(EGLenum api) {
1309 return driver_->fn.eglBindAPIFn(api); 299 return driver_->fn.eglBindAPIFn(api);
1310 } 300 }
1311 301
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
2059 return egl_api_->eglWaitNativeFn(engine); 1049 return egl_api_->eglWaitNativeFn(engine);
2060 } 1050 }
2061 1051
2062 EGLint TraceEGLApi::eglWaitSyncKHRFn(EGLDisplay dpy, 1052 EGLint TraceEGLApi::eglWaitSyncKHRFn(EGLDisplay dpy,
2063 EGLSyncKHR sync, 1053 EGLSyncKHR sync,
2064 EGLint flags) { 1054 EGLint flags) {
2065 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglWaitSyncKHR") 1055 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglWaitSyncKHR")
2066 return egl_api_->eglWaitSyncKHRFn(dpy, sync, flags); 1056 return egl_api_->eglWaitSyncKHRFn(dpy, sync, flags);
2067 } 1057 }
2068 1058
1059 EGLBoolean DebugEGLApi::eglBindAPIFn(EGLenum api) {
1060 GL_SERVICE_LOG("eglBindAPI"
1061 << "(" << api << ")");
1062 EGLBoolean result = egl_api_->eglBindAPIFn(api);
1063 GL_SERVICE_LOG("GL_RESULT: " << result);
1064 return result;
1065 }
1066
1067 EGLBoolean DebugEGLApi::eglBindTexImageFn(EGLDisplay dpy,
1068 EGLSurface surface,
1069 EGLint buffer) {
1070 GL_SERVICE_LOG("eglBindTexImage"
1071 << "(" << dpy << ", " << surface << ", " << buffer << ")");
1072 EGLBoolean result = egl_api_->eglBindTexImageFn(dpy, surface, buffer);
1073 GL_SERVICE_LOG("GL_RESULT: " << result);
1074 return result;
1075 }
1076
1077 EGLBoolean DebugEGLApi::eglChooseConfigFn(EGLDisplay dpy,
1078 const EGLint* attrib_list,
1079 EGLConfig* configs,
1080 EGLint config_size,
1081 EGLint* num_config) {
1082 GL_SERVICE_LOG("eglChooseConfig"
1083 << "(" << dpy << ", " << static_cast<const void*>(attrib_list)
1084 << ", " << static_cast<const void*>(configs) << ", "
1085 << config_size << ", " << static_cast<const void*>(num_config)
1086 << ")");
1087 EGLBoolean result = egl_api_->eglChooseConfigFn(dpy, attrib_list, configs,
1088 config_size, num_config);
1089 GL_SERVICE_LOG("GL_RESULT: " << result);
1090 return result;
1091 }
1092
1093 EGLint DebugEGLApi::eglClientWaitSyncKHRFn(EGLDisplay dpy,
1094 EGLSyncKHR sync,
1095 EGLint flags,
1096 EGLTimeKHR timeout) {
1097 GL_SERVICE_LOG("eglClientWaitSyncKHR"
1098 << "(" << dpy << ", " << sync << ", " << flags << ", "
1099 << timeout << ")");
1100 EGLint result = egl_api_->eglClientWaitSyncKHRFn(dpy, sync, flags, timeout);
1101 GL_SERVICE_LOG("GL_RESULT: " << result);
1102 return result;
1103 }
1104
1105 EGLBoolean DebugEGLApi::eglCopyBuffersFn(EGLDisplay dpy,
1106 EGLSurface surface,
1107 EGLNativePixmapType target) {
1108 GL_SERVICE_LOG("eglCopyBuffers"
1109 << "(" << dpy << ", " << surface << ", " << target << ")");
1110 EGLBoolean result = egl_api_->eglCopyBuffersFn(dpy, surface, target);
1111 GL_SERVICE_LOG("GL_RESULT: " << result);
1112 return result;
1113 }
1114
1115 EGLContext DebugEGLApi::eglCreateContextFn(EGLDisplay dpy,
1116 EGLConfig config,
1117 EGLContext share_context,
1118 const EGLint* attrib_list) {
1119 GL_SERVICE_LOG("eglCreateContext"
1120 << "(" << dpy << ", " << config << ", " << share_context
1121 << ", " << static_cast<const void*>(attrib_list) << ")");
1122 EGLContext result =
1123 egl_api_->eglCreateContextFn(dpy, config, share_context, attrib_list);
1124 GL_SERVICE_LOG("GL_RESULT: " << result);
1125 return result;
1126 }
1127
1128 EGLImageKHR DebugEGLApi::eglCreateImageKHRFn(EGLDisplay dpy,
1129 EGLContext ctx,
1130 EGLenum target,
1131 EGLClientBuffer buffer,
1132 const EGLint* attrib_list) {
1133 GL_SERVICE_LOG("eglCreateImageKHR"
1134 << "(" << dpy << ", " << ctx << ", " << target << ", "
1135 << buffer << ", " << static_cast<const void*>(attrib_list)
1136 << ")");
1137 EGLImageKHR result =
1138 egl_api_->eglCreateImageKHRFn(dpy, ctx, target, buffer, attrib_list);
1139 GL_SERVICE_LOG("GL_RESULT: " << result);
1140 return result;
1141 }
1142
1143 EGLSurface DebugEGLApi::eglCreatePbufferFromClientBufferFn(
1144 EGLDisplay dpy,
1145 EGLenum buftype,
1146 void* buffer,
1147 EGLConfig config,
1148 const EGLint* attrib_list) {
1149 GL_SERVICE_LOG("eglCreatePbufferFromClientBuffer"
1150 << "(" << dpy << ", " << buftype << ", "
1151 << static_cast<const void*>(buffer) << ", " << config << ", "
1152 << static_cast<const void*>(attrib_list) << ")");
1153 EGLSurface result = egl_api_->eglCreatePbufferFromClientBufferFn(
1154 dpy, buftype, buffer, config, attrib_list);
1155 GL_SERVICE_LOG("GL_RESULT: " << result);
1156 return result;
1157 }
1158
1159 EGLSurface DebugEGLApi::eglCreatePbufferSurfaceFn(EGLDisplay dpy,
1160 EGLConfig config,
1161 const EGLint* attrib_list) {
1162 GL_SERVICE_LOG("eglCreatePbufferSurface"
1163 << "(" << dpy << ", " << config << ", "
1164 << static_cast<const void*>(attrib_list) << ")");
1165 EGLSurface result =
1166 egl_api_->eglCreatePbufferSurfaceFn(dpy, config, attrib_list);
1167 GL_SERVICE_LOG("GL_RESULT: " << result);
1168 return result;
1169 }
1170
1171 EGLSurface DebugEGLApi::eglCreatePixmapSurfaceFn(EGLDisplay dpy,
1172 EGLConfig config,
1173 EGLNativePixmapType pixmap,
1174 const EGLint* attrib_list) {
1175 GL_SERVICE_LOG("eglCreatePixmapSurface"
1176 << "(" << dpy << ", " << config << ", " << pixmap << ", "
1177 << static_cast<const void*>(attrib_list) << ")");
1178 EGLSurface result =
1179 egl_api_->eglCreatePixmapSurfaceFn(dpy, config, pixmap, attrib_list);
1180 GL_SERVICE_LOG("GL_RESULT: " << result);
1181 return result;
1182 }
1183
1184 EGLStreamKHR DebugEGLApi::eglCreateStreamKHRFn(EGLDisplay dpy,
1185 const EGLint* attrib_list) {
1186 GL_SERVICE_LOG("eglCreateStreamKHR"
1187 << "(" << dpy << ", " << static_cast<const void*>(attrib_list)
1188 << ")");
1189 EGLStreamKHR result = egl_api_->eglCreateStreamKHRFn(dpy, attrib_list);
1190 GL_SERVICE_LOG("GL_RESULT: " << result);
1191 return result;
1192 }
1193
1194 EGLBoolean DebugEGLApi::eglCreateStreamProducerD3DTextureNV12ANGLEFn(
1195 EGLDisplay dpy,
1196 EGLStreamKHR stream,
1197 EGLAttrib* attrib_list) {
1198 GL_SERVICE_LOG("eglCreateStreamProducerD3DTextureNV12ANGLE"
1199 << "(" << dpy << ", " << stream << ", "
1200 << static_cast<const void*>(attrib_list) << ")");
1201 EGLBoolean result = egl_api_->eglCreateStreamProducerD3DTextureNV12ANGLEFn(
1202 dpy, stream, attrib_list);
1203 GL_SERVICE_LOG("GL_RESULT: " << result);
1204 return result;
1205 }
1206
1207 EGLSyncKHR DebugEGLApi::eglCreateSyncKHRFn(EGLDisplay dpy,
1208 EGLenum type,
1209 const EGLint* attrib_list) {
1210 GL_SERVICE_LOG("eglCreateSyncKHR"
1211 << "(" << dpy << ", " << type << ", "
1212 << static_cast<const void*>(attrib_list) << ")");
1213 EGLSyncKHR result = egl_api_->eglCreateSyncKHRFn(dpy, type, attrib_list);
1214 GL_SERVICE_LOG("GL_RESULT: " << result);
1215 return result;
1216 }
1217
1218 EGLSurface DebugEGLApi::eglCreateWindowSurfaceFn(EGLDisplay dpy,
1219 EGLConfig config,
1220 EGLNativeWindowType win,
1221 const EGLint* attrib_list) {
1222 GL_SERVICE_LOG("eglCreateWindowSurface"
1223 << "(" << dpy << ", " << config << ", " << win << ", "
1224 << static_cast<const void*>(attrib_list) << ")");
1225 EGLSurface result =
1226 egl_api_->eglCreateWindowSurfaceFn(dpy, config, win, attrib_list);
1227 GL_SERVICE_LOG("GL_RESULT: " << result);
1228 return result;
1229 }
1230
1231 EGLBoolean DebugEGLApi::eglDestroyContextFn(EGLDisplay dpy, EGLContext ctx) {
1232 GL_SERVICE_LOG("eglDestroyContext"
1233 << "(" << dpy << ", " << ctx << ")");
1234 EGLBoolean result = egl_api_->eglDestroyContextFn(dpy, ctx);
1235 GL_SERVICE_LOG("GL_RESULT: " << result);
1236 return result;
1237 }
1238
1239 EGLBoolean DebugEGLApi::eglDestroyImageKHRFn(EGLDisplay dpy,
1240 EGLImageKHR image) {
1241 GL_SERVICE_LOG("eglDestroyImageKHR"
1242 << "(" << dpy << ", " << image << ")");
1243 EGLBoolean result = egl_api_->eglDestroyImageKHRFn(dpy, image);
1244 GL_SERVICE_LOG("GL_RESULT: " << result);
1245 return result;
1246 }
1247
1248 EGLBoolean DebugEGLApi::eglDestroyStreamKHRFn(EGLDisplay dpy,
1249 EGLStreamKHR stream) {
1250 GL_SERVICE_LOG("eglDestroyStreamKHR"
1251 << "(" << dpy << ", " << stream << ")");
1252 EGLBoolean result = egl_api_->eglDestroyStreamKHRFn(dpy, stream);
1253 GL_SERVICE_LOG("GL_RESULT: " << result);
1254 return result;
1255 }
1256
1257 EGLBoolean DebugEGLApi::eglDestroySurfaceFn(EGLDisplay dpy,
1258 EGLSurface surface) {
1259 GL_SERVICE_LOG("eglDestroySurface"
1260 << "(" << dpy << ", " << surface << ")");
1261 EGLBoolean result = egl_api_->eglDestroySurfaceFn(dpy, surface);
1262 GL_SERVICE_LOG("GL_RESULT: " << result);
1263 return result;
1264 }
1265
1266 EGLBoolean DebugEGLApi::eglDestroySyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync) {
1267 GL_SERVICE_LOG("eglDestroySyncKHR"
1268 << "(" << dpy << ", " << sync << ")");
1269 EGLBoolean result = egl_api_->eglDestroySyncKHRFn(dpy, sync);
1270 GL_SERVICE_LOG("GL_RESULT: " << result);
1271 return result;
1272 }
1273
1274 EGLBoolean DebugEGLApi::eglGetConfigAttribFn(EGLDisplay dpy,
1275 EGLConfig config,
1276 EGLint attribute,
1277 EGLint* value) {
1278 GL_SERVICE_LOG("eglGetConfigAttrib"
1279 << "(" << dpy << ", " << config << ", " << attribute << ", "
1280 << static_cast<const void*>(value) << ")");
1281 EGLBoolean result =
1282 egl_api_->eglGetConfigAttribFn(dpy, config, attribute, value);
1283 GL_SERVICE_LOG("GL_RESULT: " << result);
1284 return result;
1285 }
1286
1287 EGLBoolean DebugEGLApi::eglGetConfigsFn(EGLDisplay dpy,
1288 EGLConfig* configs,
1289 EGLint config_size,
1290 EGLint* num_config) {
1291 GL_SERVICE_LOG("eglGetConfigs"
1292 << "(" << dpy << ", " << static_cast<const void*>(configs)
1293 << ", " << config_size << ", "
1294 << static_cast<const void*>(num_config) << ")");
1295 EGLBoolean result =
1296 egl_api_->eglGetConfigsFn(dpy, configs, config_size, num_config);
1297 GL_SERVICE_LOG("GL_RESULT: " << result);
1298 return result;
1299 }
1300
1301 EGLContext DebugEGLApi::eglGetCurrentContextFn(void) {
1302 GL_SERVICE_LOG("eglGetCurrentContext"
1303 << "("
1304 << ")");
1305 EGLContext result = egl_api_->eglGetCurrentContextFn();
1306 GL_SERVICE_LOG("GL_RESULT: " << result);
1307 return result;
1308 }
1309
1310 EGLDisplay DebugEGLApi::eglGetCurrentDisplayFn(void) {
1311 GL_SERVICE_LOG("eglGetCurrentDisplay"
1312 << "("
1313 << ")");
1314 EGLDisplay result = egl_api_->eglGetCurrentDisplayFn();
1315 GL_SERVICE_LOG("GL_RESULT: " << result);
1316 return result;
1317 }
1318
1319 EGLSurface DebugEGLApi::eglGetCurrentSurfaceFn(EGLint readdraw) {
1320 GL_SERVICE_LOG("eglGetCurrentSurface"
1321 << "(" << readdraw << ")");
1322 EGLSurface result = egl_api_->eglGetCurrentSurfaceFn(readdraw);
1323 GL_SERVICE_LOG("GL_RESULT: " << result);
1324 return result;
1325 }
1326
1327 EGLDisplay DebugEGLApi::eglGetDisplayFn(EGLNativeDisplayType display_id) {
1328 GL_SERVICE_LOG("eglGetDisplay"
1329 << "(" << display_id << ")");
1330 EGLDisplay result = egl_api_->eglGetDisplayFn(display_id);
1331 GL_SERVICE_LOG("GL_RESULT: " << result);
1332 return result;
1333 }
1334
1335 EGLint DebugEGLApi::eglGetErrorFn(void) {
1336 GL_SERVICE_LOG("eglGetError"
1337 << "("
1338 << ")");
1339 EGLint result = egl_api_->eglGetErrorFn();
1340 GL_SERVICE_LOG("GL_RESULT: " << result);
1341 return result;
1342 }
1343
1344 EGLDisplay DebugEGLApi::eglGetPlatformDisplayEXTFn(EGLenum platform,
1345 void* native_display,
1346 const EGLint* attrib_list) {
1347 GL_SERVICE_LOG("eglGetPlatformDisplayEXT"
1348 << "(" << platform << ", "
1349 << static_cast<const void*>(native_display) << ", "
1350 << static_cast<const void*>(attrib_list) << ")");
1351 EGLDisplay result = egl_api_->eglGetPlatformDisplayEXTFn(
1352 platform, native_display, attrib_list);
1353 GL_SERVICE_LOG("GL_RESULT: " << result);
1354 return result;
1355 }
1356
1357 __eglMustCastToProperFunctionPointerType DebugEGLApi::eglGetProcAddressFn(
1358 const char* procname) {
1359 GL_SERVICE_LOG("eglGetProcAddress"
1360 << "(" << procname << ")");
1361 __eglMustCastToProperFunctionPointerType result =
1362 egl_api_->eglGetProcAddressFn(procname);
1363 GL_SERVICE_LOG("GL_RESULT: " << result);
1364 return result;
1365 }
1366
1367 EGLBoolean DebugEGLApi::eglGetSyncAttribKHRFn(EGLDisplay dpy,
1368 EGLSyncKHR sync,
1369 EGLint attribute,
1370 EGLint* value) {
1371 GL_SERVICE_LOG("eglGetSyncAttribKHR"
1372 << "(" << dpy << ", " << sync << ", " << attribute << ", "
1373 << static_cast<const void*>(value) << ")");
1374 EGLBoolean result =
1375 egl_api_->eglGetSyncAttribKHRFn(dpy, sync, attribute, value);
1376 GL_SERVICE_LOG("GL_RESULT: " << result);
1377 return result;
1378 }
1379
1380 EGLBoolean DebugEGLApi::eglGetSyncValuesCHROMIUMFn(EGLDisplay dpy,
1381 EGLSurface surface,
1382 EGLuint64CHROMIUM* ust,
1383 EGLuint64CHROMIUM* msc,
1384 EGLuint64CHROMIUM* sbc) {
1385 GL_SERVICE_LOG("eglGetSyncValuesCHROMIUM"
1386 << "(" << dpy << ", " << surface << ", "
1387 << static_cast<const void*>(ust) << ", "
1388 << static_cast<const void*>(msc) << ", "
1389 << static_cast<const void*>(sbc) << ")");
1390 EGLBoolean result =
1391 egl_api_->eglGetSyncValuesCHROMIUMFn(dpy, surface, ust, msc, sbc);
1392 GL_SERVICE_LOG("GL_RESULT: " << result);
1393 return result;
1394 }
1395
1396 EGLBoolean DebugEGLApi::eglImageFlushExternalEXTFn(
1397 EGLDisplay dpy,
1398 EGLImageKHR image,
1399 const EGLAttrib* attrib_list) {
1400 GL_SERVICE_LOG("eglImageFlushExternalEXT"
1401 << "(" << dpy << ", " << image << ", "
1402 << static_cast<const void*>(attrib_list) << ")");
1403 EGLBoolean result =
1404 egl_api_->eglImageFlushExternalEXTFn(dpy, image, attrib_list);
1405 GL_SERVICE_LOG("GL_RESULT: " << result);
1406 return result;
1407 }
1408
1409 EGLBoolean DebugEGLApi::eglInitializeFn(EGLDisplay dpy,
1410 EGLint* major,
1411 EGLint* minor) {
1412 GL_SERVICE_LOG("eglInitialize"
1413 << "(" << dpy << ", " << static_cast<const void*>(major)
1414 << ", " << static_cast<const void*>(minor) << ")");
1415 EGLBoolean result = egl_api_->eglInitializeFn(dpy, major, minor);
1416 GL_SERVICE_LOG("GL_RESULT: " << result);
1417 return result;
1418 }
1419
1420 EGLBoolean DebugEGLApi::eglMakeCurrentFn(EGLDisplay dpy,
1421 EGLSurface draw,
1422 EGLSurface read,
1423 EGLContext ctx) {
1424 GL_SERVICE_LOG("eglMakeCurrent"
1425 << "(" << dpy << ", " << draw << ", " << read << ", " << ctx
1426 << ")");
1427 EGLBoolean result = egl_api_->eglMakeCurrentFn(dpy, draw, read, ctx);
1428 GL_SERVICE_LOG("GL_RESULT: " << result);
1429 return result;
1430 }
1431
1432 EGLBoolean DebugEGLApi::eglPostSubBufferNVFn(EGLDisplay dpy,
1433 EGLSurface surface,
1434 EGLint x,
1435 EGLint y,
1436 EGLint width,
1437 EGLint height) {
1438 GL_SERVICE_LOG("eglPostSubBufferNV"
1439 << "(" << dpy << ", " << surface << ", " << x << ", " << y
1440 << ", " << width << ", " << height << ")");
1441 EGLBoolean result =
1442 egl_api_->eglPostSubBufferNVFn(dpy, surface, x, y, width, height);
1443 GL_SERVICE_LOG("GL_RESULT: " << result);
1444 return result;
1445 }
1446
1447 EGLenum DebugEGLApi::eglQueryAPIFn(void) {
1448 GL_SERVICE_LOG("eglQueryAPI"
1449 << "("
1450 << ")");
1451 EGLenum result = egl_api_->eglQueryAPIFn();
1452 GL_SERVICE_LOG("GL_RESULT: " << result);
1453 return result;
1454 }
1455
1456 EGLBoolean DebugEGLApi::eglQueryContextFn(EGLDisplay dpy,
1457 EGLContext ctx,
1458 EGLint attribute,
1459 EGLint* value) {
1460 GL_SERVICE_LOG("eglQueryContext"
1461 << "(" << dpy << ", " << ctx << ", " << attribute << ", "
1462 << static_cast<const void*>(value) << ")");
1463 EGLBoolean result = egl_api_->eglQueryContextFn(dpy, ctx, attribute, value);
1464 GL_SERVICE_LOG("GL_RESULT: " << result);
1465 return result;
1466 }
1467
1468 EGLBoolean DebugEGLApi::eglQueryStreamKHRFn(EGLDisplay dpy,
1469 EGLStreamKHR stream,
1470 EGLenum attribute,
1471 EGLint* value) {
1472 GL_SERVICE_LOG("eglQueryStreamKHR"
1473 << "(" << dpy << ", " << stream << ", " << attribute << ", "
1474 << static_cast<const void*>(value) << ")");
1475 EGLBoolean result =
1476 egl_api_->eglQueryStreamKHRFn(dpy, stream, attribute, value);
1477 GL_SERVICE_LOG("GL_RESULT: " << result);
1478 return result;
1479 }
1480
1481 EGLBoolean DebugEGLApi::eglQueryStreamu64KHRFn(EGLDisplay dpy,
1482 EGLStreamKHR stream,
1483 EGLenum attribute,
1484 EGLuint64KHR* value) {
1485 GL_SERVICE_LOG("eglQueryStreamu64KHR"
1486 << "(" << dpy << ", " << stream << ", " << attribute << ", "
1487 << static_cast<const void*>(value) << ")");
1488 EGLBoolean result =
1489 egl_api_->eglQueryStreamu64KHRFn(dpy, stream, attribute, value);
1490 GL_SERVICE_LOG("GL_RESULT: " << result);
1491 return result;
1492 }
1493
1494 const char* DebugEGLApi::eglQueryStringFn(EGLDisplay dpy, EGLint name) {
1495 GL_SERVICE_LOG("eglQueryString"
1496 << "(" << dpy << ", " << name << ")");
1497 const char* result = egl_api_->eglQueryStringFn(dpy, name);
1498 GL_SERVICE_LOG("GL_RESULT: " << result);
1499 return result;
1500 }
1501
1502 EGLBoolean DebugEGLApi::eglQuerySurfaceFn(EGLDisplay dpy,
1503 EGLSurface surface,
1504 EGLint attribute,
1505 EGLint* value) {
1506 GL_SERVICE_LOG("eglQuerySurface"
1507 << "(" << dpy << ", " << surface << ", " << attribute << ", "
1508 << static_cast<const void*>(value) << ")");
1509 EGLBoolean result =
1510 egl_api_->eglQuerySurfaceFn(dpy, surface, attribute, value);
1511 GL_SERVICE_LOG("GL_RESULT: " << result);
1512 return result;
1513 }
1514
1515 EGLBoolean DebugEGLApi::eglQuerySurfacePointerANGLEFn(EGLDisplay dpy,
1516 EGLSurface surface,
1517 EGLint attribute,
1518 void** value) {
1519 GL_SERVICE_LOG("eglQuerySurfacePointerANGLE"
1520 << "(" << dpy << ", " << surface << ", " << attribute << ", "
1521 << value << ")");
1522 EGLBoolean result =
1523 egl_api_->eglQuerySurfacePointerANGLEFn(dpy, surface, attribute, value);
1524 GL_SERVICE_LOG("GL_RESULT: " << result);
1525 return result;
1526 }
1527
1528 EGLBoolean DebugEGLApi::eglReleaseTexImageFn(EGLDisplay dpy,
1529 EGLSurface surface,
1530 EGLint buffer) {
1531 GL_SERVICE_LOG("eglReleaseTexImage"
1532 << "(" << dpy << ", " << surface << ", " << buffer << ")");
1533 EGLBoolean result = egl_api_->eglReleaseTexImageFn(dpy, surface, buffer);
1534 GL_SERVICE_LOG("GL_RESULT: " << result);
1535 return result;
1536 }
1537
1538 EGLBoolean DebugEGLApi::eglReleaseThreadFn(void) {
1539 GL_SERVICE_LOG("eglReleaseThread"
1540 << "("
1541 << ")");
1542 EGLBoolean result = egl_api_->eglReleaseThreadFn();
1543 GL_SERVICE_LOG("GL_RESULT: " << result);
1544 return result;
1545 }
1546
1547 EGLBoolean DebugEGLApi::eglStreamAttribKHRFn(EGLDisplay dpy,
1548 EGLStreamKHR stream,
1549 EGLenum attribute,
1550 EGLint value) {
1551 GL_SERVICE_LOG("eglStreamAttribKHR"
1552 << "(" << dpy << ", " << stream << ", " << attribute << ", "
1553 << value << ")");
1554 EGLBoolean result =
1555 egl_api_->eglStreamAttribKHRFn(dpy, stream, attribute, value);
1556 GL_SERVICE_LOG("GL_RESULT: " << result);
1557 return result;
1558 }
1559
1560 EGLBoolean DebugEGLApi::eglStreamConsumerAcquireKHRFn(EGLDisplay dpy,
1561 EGLStreamKHR stream) {
1562 GL_SERVICE_LOG("eglStreamConsumerAcquireKHR"
1563 << "(" << dpy << ", " << stream << ")");
1564 EGLBoolean result = egl_api_->eglStreamConsumerAcquireKHRFn(dpy, stream);
1565 GL_SERVICE_LOG("GL_RESULT: " << result);
1566 return result;
1567 }
1568
1569 EGLBoolean DebugEGLApi::eglStreamConsumerGLTextureExternalAttribsNVFn(
1570 EGLDisplay dpy,
1571 EGLStreamKHR stream,
1572 EGLAttrib* attrib_list) {
1573 GL_SERVICE_LOG("eglStreamConsumerGLTextureExternalAttribsNV"
1574 << "(" << dpy << ", " << stream << ", "
1575 << static_cast<const void*>(attrib_list) << ")");
1576 EGLBoolean result = egl_api_->eglStreamConsumerGLTextureExternalAttribsNVFn(
1577 dpy, stream, attrib_list);
1578 GL_SERVICE_LOG("GL_RESULT: " << result);
1579 return result;
1580 }
1581
1582 EGLBoolean DebugEGLApi::eglStreamConsumerGLTextureExternalKHRFn(
1583 EGLDisplay dpy,
1584 EGLStreamKHR stream) {
1585 GL_SERVICE_LOG("eglStreamConsumerGLTextureExternalKHR"
1586 << "(" << dpy << ", " << stream << ")");
1587 EGLBoolean result =
1588 egl_api_->eglStreamConsumerGLTextureExternalKHRFn(dpy, stream);
1589 GL_SERVICE_LOG("GL_RESULT: " << result);
1590 return result;
1591 }
1592
1593 EGLBoolean DebugEGLApi::eglStreamConsumerReleaseKHRFn(EGLDisplay dpy,
1594 EGLStreamKHR stream) {
1595 GL_SERVICE_LOG("eglStreamConsumerReleaseKHR"
1596 << "(" << dpy << ", " << stream << ")");
1597 EGLBoolean result = egl_api_->eglStreamConsumerReleaseKHRFn(dpy, stream);
1598 GL_SERVICE_LOG("GL_RESULT: " << result);
1599 return result;
1600 }
1601
1602 EGLBoolean DebugEGLApi::eglStreamPostD3DTextureNV12ANGLEFn(
1603 EGLDisplay dpy,
1604 EGLStreamKHR stream,
1605 void* texture,
1606 const EGLAttrib* attrib_list) {
1607 GL_SERVICE_LOG("eglStreamPostD3DTextureNV12ANGLE"
1608 << "(" << dpy << ", " << stream << ", "
1609 << static_cast<const void*>(texture) << ", "
1610 << static_cast<const void*>(attrib_list) << ")");
1611 EGLBoolean result = egl_api_->eglStreamPostD3DTextureNV12ANGLEFn(
1612 dpy, stream, texture, attrib_list);
1613 GL_SERVICE_LOG("GL_RESULT: " << result);
1614 return result;
1615 }
1616
1617 EGLBoolean DebugEGLApi::eglSurfaceAttribFn(EGLDisplay dpy,
1618 EGLSurface surface,
1619 EGLint attribute,
1620 EGLint value) {
1621 GL_SERVICE_LOG("eglSurfaceAttrib"
1622 << "(" << dpy << ", " << surface << ", " << attribute << ", "
1623 << value << ")");
1624 EGLBoolean result =
1625 egl_api_->eglSurfaceAttribFn(dpy, surface, attribute, value);
1626 GL_SERVICE_LOG("GL_RESULT: " << result);
1627 return result;
1628 }
1629
1630 EGLBoolean DebugEGLApi::eglSwapBuffersFn(EGLDisplay dpy, EGLSurface surface) {
1631 GL_SERVICE_LOG("eglSwapBuffers"
1632 << "(" << dpy << ", " << surface << ")");
1633 EGLBoolean result = egl_api_->eglSwapBuffersFn(dpy, surface);
1634 GL_SERVICE_LOG("GL_RESULT: " << result);
1635 return result;
1636 }
1637
1638 EGLBoolean DebugEGLApi::eglSwapBuffersWithDamageKHRFn(EGLDisplay dpy,
1639 EGLSurface surface,
1640 EGLint* rects,
1641 EGLint n_rects) {
1642 GL_SERVICE_LOG("eglSwapBuffersWithDamageKHR"
1643 << "(" << dpy << ", " << surface << ", "
1644 << static_cast<const void*>(rects) << ", " << n_rects << ")");
1645 EGLBoolean result =
1646 egl_api_->eglSwapBuffersWithDamageKHRFn(dpy, surface, rects, n_rects);
1647 GL_SERVICE_LOG("GL_RESULT: " << result);
1648 return result;
1649 }
1650
1651 EGLBoolean DebugEGLApi::eglSwapIntervalFn(EGLDisplay dpy, EGLint interval) {
1652 GL_SERVICE_LOG("eglSwapInterval"
1653 << "(" << dpy << ", " << interval << ")");
1654 EGLBoolean result = egl_api_->eglSwapIntervalFn(dpy, interval);
1655 GL_SERVICE_LOG("GL_RESULT: " << result);
1656 return result;
1657 }
1658
1659 EGLBoolean DebugEGLApi::eglTerminateFn(EGLDisplay dpy) {
1660 GL_SERVICE_LOG("eglTerminate"
1661 << "(" << dpy << ")");
1662 EGLBoolean result = egl_api_->eglTerminateFn(dpy);
1663 GL_SERVICE_LOG("GL_RESULT: " << result);
1664 return result;
1665 }
1666
1667 EGLBoolean DebugEGLApi::eglWaitClientFn(void) {
1668 GL_SERVICE_LOG("eglWaitClient"
1669 << "("
1670 << ")");
1671 EGLBoolean result = egl_api_->eglWaitClientFn();
1672 GL_SERVICE_LOG("GL_RESULT: " << result);
1673 return result;
1674 }
1675
1676 EGLBoolean DebugEGLApi::eglWaitGLFn(void) {
1677 GL_SERVICE_LOG("eglWaitGL"
1678 << "("
1679 << ")");
1680 EGLBoolean result = egl_api_->eglWaitGLFn();
1681 GL_SERVICE_LOG("GL_RESULT: " << result);
1682 return result;
1683 }
1684
1685 EGLBoolean DebugEGLApi::eglWaitNativeFn(EGLint engine) {
1686 GL_SERVICE_LOG("eglWaitNative"
1687 << "(" << engine << ")");
1688 EGLBoolean result = egl_api_->eglWaitNativeFn(engine);
1689 GL_SERVICE_LOG("GL_RESULT: " << result);
1690 return result;
1691 }
1692
1693 EGLint DebugEGLApi::eglWaitSyncKHRFn(EGLDisplay dpy,
1694 EGLSyncKHR sync,
1695 EGLint flags) {
1696 GL_SERVICE_LOG("eglWaitSyncKHR"
1697 << "(" << dpy << ", " << sync << ", " << flags << ")");
1698 EGLint result = egl_api_->eglWaitSyncKHRFn(dpy, sync, flags);
1699 GL_SERVICE_LOG("GL_RESULT: " << result);
1700 return result;
1701 }
1702
2069 } // namespace gl 1703 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_bindings.h ('k') | ui/gl/gl_bindings_autogen_gl0.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698