OLD | NEW |
(Empty) | |
| 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! |
| 10 |
| 11 #include <string> |
| 12 |
| 13 #include "base/debug/trace_event.h" |
| 14 #include "ui/gl/gl_bindings.h" |
| 15 #include "ui/gl/gl_context.h" |
| 16 #include "ui/gl/gl_egl_api_implementation.h" |
| 17 #include "ui/gl/gl_enums.h" |
| 18 #include "ui/gl/gl_implementation.h" |
| 19 #include "ui/gl/gl_version_info.h" |
| 20 |
| 21 namespace gfx { |
| 22 |
| 23 static bool g_debugBindingsInitialized; |
| 24 DriverEGL g_driver_egl; |
| 25 |
| 26 void DriverEGL::InitializeStaticBindings() { |
| 27 fn.eglBindAPIFn = |
| 28 reinterpret_cast<eglBindAPIProc>(GetGLProcAddress("eglBindAPI")); |
| 29 fn.eglBindTexImageFn = reinterpret_cast<eglBindTexImageProc>( |
| 30 GetGLProcAddress("eglBindTexImage")); |
| 31 fn.eglChooseConfigFn = reinterpret_cast<eglChooseConfigProc>( |
| 32 GetGLProcAddress("eglChooseConfig")); |
| 33 fn.eglClientWaitSyncKHRFn = reinterpret_cast<eglClientWaitSyncKHRProc>( |
| 34 GetGLProcAddress("eglClientWaitSyncKHR")); |
| 35 fn.eglCopyBuffersFn = |
| 36 reinterpret_cast<eglCopyBuffersProc>(GetGLProcAddress("eglCopyBuffers")); |
| 37 fn.eglCreateContextFn = reinterpret_cast<eglCreateContextProc>( |
| 38 GetGLProcAddress("eglCreateContext")); |
| 39 fn.eglCreateImageKHRFn = reinterpret_cast<eglCreateImageKHRProc>( |
| 40 GetGLProcAddress("eglCreateImageKHR")); |
| 41 fn.eglCreatePbufferFromClientBufferFn = |
| 42 reinterpret_cast<eglCreatePbufferFromClientBufferProc>( |
| 43 GetGLProcAddress("eglCreatePbufferFromClientBuffer")); |
| 44 fn.eglCreatePbufferSurfaceFn = reinterpret_cast<eglCreatePbufferSurfaceProc>( |
| 45 GetGLProcAddress("eglCreatePbufferSurface")); |
| 46 fn.eglCreatePixmapSurfaceFn = reinterpret_cast<eglCreatePixmapSurfaceProc>( |
| 47 GetGLProcAddress("eglCreatePixmapSurface")); |
| 48 fn.eglCreateSyncKHRFn = reinterpret_cast<eglCreateSyncKHRProc>( |
| 49 GetGLProcAddress("eglCreateSyncKHR")); |
| 50 fn.eglCreateWindowSurfaceFn = reinterpret_cast<eglCreateWindowSurfaceProc>( |
| 51 GetGLProcAddress("eglCreateWindowSurface")); |
| 52 fn.eglDestroyContextFn = reinterpret_cast<eglDestroyContextProc>( |
| 53 GetGLProcAddress("eglDestroyContext")); |
| 54 fn.eglDestroyImageKHRFn = reinterpret_cast<eglDestroyImageKHRProc>( |
| 55 GetGLProcAddress("eglDestroyImageKHR")); |
| 56 fn.eglDestroySurfaceFn = reinterpret_cast<eglDestroySurfaceProc>( |
| 57 GetGLProcAddress("eglDestroySurface")); |
| 58 fn.eglDestroySyncKHRFn = reinterpret_cast<eglDestroySyncKHRProc>( |
| 59 GetGLProcAddress("eglDestroySyncKHR")); |
| 60 fn.eglGetConfigAttribFn = reinterpret_cast<eglGetConfigAttribProc>( |
| 61 GetGLProcAddress("eglGetConfigAttrib")); |
| 62 fn.eglGetConfigsFn = |
| 63 reinterpret_cast<eglGetConfigsProc>(GetGLProcAddress("eglGetConfigs")); |
| 64 fn.eglGetCurrentContextFn = reinterpret_cast<eglGetCurrentContextProc>( |
| 65 GetGLProcAddress("eglGetCurrentContext")); |
| 66 fn.eglGetCurrentDisplayFn = reinterpret_cast<eglGetCurrentDisplayProc>( |
| 67 GetGLProcAddress("eglGetCurrentDisplay")); |
| 68 fn.eglGetCurrentSurfaceFn = reinterpret_cast<eglGetCurrentSurfaceProc>( |
| 69 GetGLProcAddress("eglGetCurrentSurface")); |
| 70 fn.eglGetDisplayFn = |
| 71 reinterpret_cast<eglGetDisplayProc>(GetGLProcAddress("eglGetDisplay")); |
| 72 fn.eglGetErrorFn = |
| 73 reinterpret_cast<eglGetErrorProc>(GetGLProcAddress("eglGetError")); |
| 74 fn.eglGetPlatformDisplayEXTFn = |
| 75 reinterpret_cast<eglGetPlatformDisplayEXTProc>( |
| 76 GetGLProcAddress("eglGetPlatformDisplayEXT")); |
| 77 fn.eglGetProcAddressFn = reinterpret_cast<eglGetProcAddressProc>( |
| 78 GetGLProcAddress("eglGetProcAddress")); |
| 79 fn.eglGetSyncAttribKHRFn = reinterpret_cast<eglGetSyncAttribKHRProc>( |
| 80 GetGLProcAddress("eglGetSyncAttribKHR")); |
| 81 fn.eglGetSyncValuesCHROMIUMFn = |
| 82 reinterpret_cast<eglGetSyncValuesCHROMIUMProc>( |
| 83 GetGLProcAddress("eglGetSyncValuesCHROMIUM")); |
| 84 fn.eglInitializeFn = |
| 85 reinterpret_cast<eglInitializeProc>(GetGLProcAddress("eglInitialize")); |
| 86 fn.eglMakeCurrentFn = |
| 87 reinterpret_cast<eglMakeCurrentProc>(GetGLProcAddress("eglMakeCurrent")); |
| 88 fn.eglPostSubBufferNVFn = reinterpret_cast<eglPostSubBufferNVProc>( |
| 89 GetGLProcAddress("eglPostSubBufferNV")); |
| 90 fn.eglQueryAPIFn = |
| 91 reinterpret_cast<eglQueryAPIProc>(GetGLProcAddress("eglQueryAPI")); |
| 92 fn.eglQueryContextFn = reinterpret_cast<eglQueryContextProc>( |
| 93 GetGLProcAddress("eglQueryContext")); |
| 94 fn.eglQueryStringFn = |
| 95 reinterpret_cast<eglQueryStringProc>(GetGLProcAddress("eglQueryString")); |
| 96 fn.eglQuerySurfaceFn = reinterpret_cast<eglQuerySurfaceProc>( |
| 97 GetGLProcAddress("eglQuerySurface")); |
| 98 fn.eglQuerySurfacePointerANGLEFn = |
| 99 reinterpret_cast<eglQuerySurfacePointerANGLEProc>( |
| 100 GetGLProcAddress("eglQuerySurfacePointerANGLE")); |
| 101 fn.eglReleaseTexImageFn = reinterpret_cast<eglReleaseTexImageProc>( |
| 102 GetGLProcAddress("eglReleaseTexImage")); |
| 103 fn.eglReleaseThreadFn = reinterpret_cast<eglReleaseThreadProc>( |
| 104 GetGLProcAddress("eglReleaseThread")); |
| 105 fn.eglSurfaceAttribFn = reinterpret_cast<eglSurfaceAttribProc>( |
| 106 GetGLProcAddress("eglSurfaceAttrib")); |
| 107 fn.eglSwapBuffersFn = |
| 108 reinterpret_cast<eglSwapBuffersProc>(GetGLProcAddress("eglSwapBuffers")); |
| 109 fn.eglSwapIntervalFn = reinterpret_cast<eglSwapIntervalProc>( |
| 110 GetGLProcAddress("eglSwapInterval")); |
| 111 fn.eglTerminateFn = |
| 112 reinterpret_cast<eglTerminateProc>(GetGLProcAddress("eglTerminate")); |
| 113 fn.eglWaitClientFn = |
| 114 reinterpret_cast<eglWaitClientProc>(GetGLProcAddress("eglWaitClient")); |
| 115 fn.eglWaitGLFn = |
| 116 reinterpret_cast<eglWaitGLProc>(GetGLProcAddress("eglWaitGL")); |
| 117 fn.eglWaitNativeFn = |
| 118 reinterpret_cast<eglWaitNativeProc>(GetGLProcAddress("eglWaitNative")); |
| 119 fn.eglWaitSyncKHRFn = |
| 120 reinterpret_cast<eglWaitSyncKHRProc>(GetGLProcAddress("eglWaitSyncKHR")); |
| 121 } |
| 122 |
| 123 void DriverEGL::InitializeDynamicBindings(GLContext* context) { |
| 124 DCHECK(context && context->IsCurrent(NULL)); |
| 125 const GLVersionInfo* ver = context->GetVersionInfo(); |
| 126 ALLOW_UNUSED_LOCAL(ver); |
| 127 std::string extensions = context->GetExtensions() + " "; |
| 128 ALLOW_UNUSED_LOCAL(extensions); |
| 129 |
| 130 ext.b_EGL_ANGLE_d3d_share_handle_client_buffer = |
| 131 extensions.find("EGL_ANGLE_d3d_share_handle_client_buffer ") != |
| 132 std::string::npos; |
| 133 ext.b_EGL_ANGLE_platform_angle = |
| 134 extensions.find("EGL_ANGLE_platform_angle ") != std::string::npos; |
| 135 ext.b_EGL_ANGLE_query_surface_pointer = |
| 136 extensions.find("EGL_ANGLE_query_surface_pointer ") != std::string::npos; |
| 137 ext.b_EGL_ANGLE_surface_d3d_texture_2d_share_handle = |
| 138 extensions.find("EGL_ANGLE_surface_d3d_texture_2d_share_handle ") != |
| 139 std::string::npos; |
| 140 ext.b_EGL_CHROMIUM_sync_control = |
| 141 extensions.find("EGL_CHROMIUM_sync_control ") != std::string::npos; |
| 142 ext.b_EGL_KHR_fence_sync = |
| 143 extensions.find("EGL_KHR_fence_sync ") != std::string::npos; |
| 144 ext.b_EGL_KHR_gl_texture_2D_image = |
| 145 extensions.find("EGL_KHR_gl_texture_2D_image ") != std::string::npos; |
| 146 ext.b_EGL_KHR_image_base = |
| 147 extensions.find("EGL_KHR_image_base ") != std::string::npos; |
| 148 ext.b_EGL_KHR_wait_sync = |
| 149 extensions.find("EGL_KHR_wait_sync ") != std::string::npos; |
| 150 ext.b_EGL_NV_post_sub_buffer = |
| 151 extensions.find("EGL_NV_post_sub_buffer ") != std::string::npos; |
| 152 |
| 153 if (g_debugBindingsInitialized) |
| 154 InitializeDebugBindings(); |
| 155 } |
| 156 |
| 157 extern "C" { |
| 158 |
| 159 static EGLBoolean GL_BINDING_CALL Debug_eglBindAPI(EGLenum api) { |
| 160 GL_SERVICE_LOG("eglBindAPI" |
| 161 << "(" << api << ")"); |
| 162 EGLBoolean result = g_driver_egl.debug_fn.eglBindAPIFn(api); |
| 163 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 164 return result; |
| 165 } |
| 166 |
| 167 static EGLBoolean GL_BINDING_CALL |
| 168 Debug_eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) { |
| 169 GL_SERVICE_LOG("eglBindTexImage" |
| 170 << "(" << dpy << ", " << surface << ", " << buffer << ")"); |
| 171 EGLBoolean result = |
| 172 g_driver_egl.debug_fn.eglBindTexImageFn(dpy, surface, buffer); |
| 173 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 174 return result; |
| 175 } |
| 176 |
| 177 static EGLBoolean GL_BINDING_CALL |
| 178 Debug_eglChooseConfig(EGLDisplay dpy, |
| 179 const EGLint* attrib_list, |
| 180 EGLConfig* configs, |
| 181 EGLint config_size, |
| 182 EGLint* num_config) { |
| 183 GL_SERVICE_LOG("eglChooseConfig" |
| 184 << "(" << dpy << ", " << static_cast<const void*>(attrib_list) |
| 185 << ", " << static_cast<const void*>(configs) << ", " |
| 186 << config_size << ", " << static_cast<const void*>(num_config) |
| 187 << ")"); |
| 188 EGLBoolean result = g_driver_egl.debug_fn.eglChooseConfigFn( |
| 189 dpy, attrib_list, configs, config_size, num_config); |
| 190 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 191 return result; |
| 192 } |
| 193 |
| 194 static EGLint GL_BINDING_CALL Debug_eglClientWaitSyncKHR(EGLDisplay dpy, |
| 195 EGLSyncKHR sync, |
| 196 EGLint flags, |
| 197 EGLTimeKHR timeout) { |
| 198 GL_SERVICE_LOG("eglClientWaitSyncKHR" |
| 199 << "(" << dpy << ", " << sync << ", " << flags << ", " |
| 200 << timeout << ")"); |
| 201 EGLint result = |
| 202 g_driver_egl.debug_fn.eglClientWaitSyncKHRFn(dpy, sync, flags, timeout); |
| 203 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 204 return result; |
| 205 } |
| 206 |
| 207 static EGLBoolean GL_BINDING_CALL |
| 208 Debug_eglCopyBuffers(EGLDisplay dpy, |
| 209 EGLSurface surface, |
| 210 EGLNativePixmapType target) { |
| 211 GL_SERVICE_LOG("eglCopyBuffers" |
| 212 << "(" << dpy << ", " << surface << ", " << target << ")"); |
| 213 EGLBoolean result = |
| 214 g_driver_egl.debug_fn.eglCopyBuffersFn(dpy, surface, target); |
| 215 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 216 return result; |
| 217 } |
| 218 |
| 219 static EGLContext GL_BINDING_CALL |
| 220 Debug_eglCreateContext(EGLDisplay dpy, |
| 221 EGLConfig config, |
| 222 EGLContext share_context, |
| 223 const EGLint* attrib_list) { |
| 224 GL_SERVICE_LOG("eglCreateContext" |
| 225 << "(" << dpy << ", " << config << ", " << share_context |
| 226 << ", " << static_cast<const void*>(attrib_list) << ")"); |
| 227 EGLContext result = g_driver_egl.debug_fn.eglCreateContextFn( |
| 228 dpy, config, share_context, attrib_list); |
| 229 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 230 return result; |
| 231 } |
| 232 |
| 233 static EGLImageKHR GL_BINDING_CALL |
| 234 Debug_eglCreateImageKHR(EGLDisplay dpy, |
| 235 EGLContext ctx, |
| 236 EGLenum target, |
| 237 EGLClientBuffer buffer, |
| 238 const EGLint* attrib_list) { |
| 239 GL_SERVICE_LOG("eglCreateImageKHR" |
| 240 << "(" << dpy << ", " << ctx << ", " << target << ", " |
| 241 << buffer << ", " << static_cast<const void*>(attrib_list) |
| 242 << ")"); |
| 243 EGLImageKHR result = g_driver_egl.debug_fn.eglCreateImageKHRFn( |
| 244 dpy, ctx, target, buffer, attrib_list); |
| 245 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 246 return result; |
| 247 } |
| 248 |
| 249 static EGLSurface GL_BINDING_CALL |
| 250 Debug_eglCreatePbufferFromClientBuffer(EGLDisplay dpy, |
| 251 EGLenum buftype, |
| 252 void* buffer, |
| 253 EGLConfig config, |
| 254 const EGLint* attrib_list) { |
| 255 GL_SERVICE_LOG("eglCreatePbufferFromClientBuffer" |
| 256 << "(" << dpy << ", " << buftype << ", " |
| 257 << static_cast<const void*>(buffer) << ", " << config << ", " |
| 258 << static_cast<const void*>(attrib_list) << ")"); |
| 259 EGLSurface result = g_driver_egl.debug_fn.eglCreatePbufferFromClientBufferFn( |
| 260 dpy, buftype, buffer, config, attrib_list); |
| 261 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 262 return result; |
| 263 } |
| 264 |
| 265 static EGLSurface GL_BINDING_CALL |
| 266 Debug_eglCreatePbufferSurface(EGLDisplay dpy, |
| 267 EGLConfig config, |
| 268 const EGLint* attrib_list) { |
| 269 GL_SERVICE_LOG("eglCreatePbufferSurface" |
| 270 << "(" << dpy << ", " << config << ", " |
| 271 << static_cast<const void*>(attrib_list) << ")"); |
| 272 EGLSurface result = |
| 273 g_driver_egl.debug_fn.eglCreatePbufferSurfaceFn(dpy, config, attrib_list); |
| 274 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 275 return result; |
| 276 } |
| 277 |
| 278 static EGLSurface GL_BINDING_CALL |
| 279 Debug_eglCreatePixmapSurface(EGLDisplay dpy, |
| 280 EGLConfig config, |
| 281 EGLNativePixmapType pixmap, |
| 282 const EGLint* attrib_list) { |
| 283 GL_SERVICE_LOG("eglCreatePixmapSurface" |
| 284 << "(" << dpy << ", " << config << ", " << pixmap << ", " |
| 285 << static_cast<const void*>(attrib_list) << ")"); |
| 286 EGLSurface result = g_driver_egl.debug_fn.eglCreatePixmapSurfaceFn( |
| 287 dpy, config, pixmap, attrib_list); |
| 288 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 289 return result; |
| 290 } |
| 291 |
| 292 static EGLSyncKHR GL_BINDING_CALL |
| 293 Debug_eglCreateSyncKHR(EGLDisplay dpy, |
| 294 EGLenum type, |
| 295 const EGLint* attrib_list) { |
| 296 GL_SERVICE_LOG("eglCreateSyncKHR" |
| 297 << "(" << dpy << ", " << type << ", " |
| 298 << static_cast<const void*>(attrib_list) << ")"); |
| 299 EGLSyncKHR result = |
| 300 g_driver_egl.debug_fn.eglCreateSyncKHRFn(dpy, type, attrib_list); |
| 301 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 302 return result; |
| 303 } |
| 304 |
| 305 static EGLSurface GL_BINDING_CALL |
| 306 Debug_eglCreateWindowSurface(EGLDisplay dpy, |
| 307 EGLConfig config, |
| 308 EGLNativeWindowType win, |
| 309 const EGLint* attrib_list) { |
| 310 GL_SERVICE_LOG("eglCreateWindowSurface" |
| 311 << "(" << dpy << ", " << config << ", " << win << ", " |
| 312 << static_cast<const void*>(attrib_list) << ")"); |
| 313 EGLSurface result = g_driver_egl.debug_fn.eglCreateWindowSurfaceFn( |
| 314 dpy, config, win, attrib_list); |
| 315 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 316 return result; |
| 317 } |
| 318 |
| 319 static EGLBoolean GL_BINDING_CALL |
| 320 Debug_eglDestroyContext(EGLDisplay dpy, EGLContext ctx) { |
| 321 GL_SERVICE_LOG("eglDestroyContext" |
| 322 << "(" << dpy << ", " << ctx << ")"); |
| 323 EGLBoolean result = g_driver_egl.debug_fn.eglDestroyContextFn(dpy, ctx); |
| 324 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 325 return result; |
| 326 } |
| 327 |
| 328 static EGLBoolean GL_BINDING_CALL |
| 329 Debug_eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image) { |
| 330 GL_SERVICE_LOG("eglDestroyImageKHR" |
| 331 << "(" << dpy << ", " << image << ")"); |
| 332 EGLBoolean result = g_driver_egl.debug_fn.eglDestroyImageKHRFn(dpy, image); |
| 333 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 334 return result; |
| 335 } |
| 336 |
| 337 static EGLBoolean GL_BINDING_CALL |
| 338 Debug_eglDestroySurface(EGLDisplay dpy, EGLSurface surface) { |
| 339 GL_SERVICE_LOG("eglDestroySurface" |
| 340 << "(" << dpy << ", " << surface << ")"); |
| 341 EGLBoolean result = g_driver_egl.debug_fn.eglDestroySurfaceFn(dpy, surface); |
| 342 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 343 return result; |
| 344 } |
| 345 |
| 346 static EGLBoolean GL_BINDING_CALL |
| 347 Debug_eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync) { |
| 348 GL_SERVICE_LOG("eglDestroySyncKHR" |
| 349 << "(" << dpy << ", " << sync << ")"); |
| 350 EGLBoolean result = g_driver_egl.debug_fn.eglDestroySyncKHRFn(dpy, sync); |
| 351 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 352 return result; |
| 353 } |
| 354 |
| 355 static EGLBoolean GL_BINDING_CALL Debug_eglGetConfigAttrib(EGLDisplay dpy, |
| 356 EGLConfig config, |
| 357 EGLint attribute, |
| 358 EGLint* value) { |
| 359 GL_SERVICE_LOG("eglGetConfigAttrib" |
| 360 << "(" << dpy << ", " << config << ", " << attribute << ", " |
| 361 << static_cast<const void*>(value) << ")"); |
| 362 EGLBoolean result = |
| 363 g_driver_egl.debug_fn.eglGetConfigAttribFn(dpy, config, attribute, value); |
| 364 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 365 return result; |
| 366 } |
| 367 |
| 368 static EGLBoolean GL_BINDING_CALL Debug_eglGetConfigs(EGLDisplay dpy, |
| 369 EGLConfig* configs, |
| 370 EGLint config_size, |
| 371 EGLint* num_config) { |
| 372 GL_SERVICE_LOG("eglGetConfigs" |
| 373 << "(" << dpy << ", " << static_cast<const void*>(configs) |
| 374 << ", " << config_size << ", " |
| 375 << static_cast<const void*>(num_config) << ")"); |
| 376 EGLBoolean result = g_driver_egl.debug_fn.eglGetConfigsFn( |
| 377 dpy, configs, config_size, num_config); |
| 378 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 379 return result; |
| 380 } |
| 381 |
| 382 static EGLContext GL_BINDING_CALL Debug_eglGetCurrentContext(void) { |
| 383 GL_SERVICE_LOG("eglGetCurrentContext" |
| 384 << "(" |
| 385 << ")"); |
| 386 EGLContext result = g_driver_egl.debug_fn.eglGetCurrentContextFn(); |
| 387 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 388 return result; |
| 389 } |
| 390 |
| 391 static EGLDisplay GL_BINDING_CALL Debug_eglGetCurrentDisplay(void) { |
| 392 GL_SERVICE_LOG("eglGetCurrentDisplay" |
| 393 << "(" |
| 394 << ")"); |
| 395 EGLDisplay result = g_driver_egl.debug_fn.eglGetCurrentDisplayFn(); |
| 396 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 397 return result; |
| 398 } |
| 399 |
| 400 static EGLSurface GL_BINDING_CALL Debug_eglGetCurrentSurface(EGLint readdraw) { |
| 401 GL_SERVICE_LOG("eglGetCurrentSurface" |
| 402 << "(" << readdraw << ")"); |
| 403 EGLSurface result = g_driver_egl.debug_fn.eglGetCurrentSurfaceFn(readdraw); |
| 404 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 405 return result; |
| 406 } |
| 407 |
| 408 static EGLDisplay GL_BINDING_CALL |
| 409 Debug_eglGetDisplay(EGLNativeDisplayType display_id) { |
| 410 GL_SERVICE_LOG("eglGetDisplay" |
| 411 << "(" << display_id << ")"); |
| 412 EGLDisplay result = g_driver_egl.debug_fn.eglGetDisplayFn(display_id); |
| 413 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 414 return result; |
| 415 } |
| 416 |
| 417 static EGLint GL_BINDING_CALL Debug_eglGetError(void) { |
| 418 GL_SERVICE_LOG("eglGetError" |
| 419 << "(" |
| 420 << ")"); |
| 421 EGLint result = g_driver_egl.debug_fn.eglGetErrorFn(); |
| 422 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 423 return result; |
| 424 } |
| 425 |
| 426 static EGLDisplay GL_BINDING_CALL |
| 427 Debug_eglGetPlatformDisplayEXT(EGLenum platform, |
| 428 void* native_display, |
| 429 const EGLint* attrib_list) { |
| 430 GL_SERVICE_LOG("eglGetPlatformDisplayEXT" |
| 431 << "(" << platform << ", " |
| 432 << static_cast<const void*>(native_display) << ", " |
| 433 << static_cast<const void*>(attrib_list) << ")"); |
| 434 EGLDisplay result = g_driver_egl.debug_fn.eglGetPlatformDisplayEXTFn( |
| 435 platform, native_display, attrib_list); |
| 436 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 437 return result; |
| 438 } |
| 439 |
| 440 static __eglMustCastToProperFunctionPointerType GL_BINDING_CALL |
| 441 Debug_eglGetProcAddress(const char* procname) { |
| 442 GL_SERVICE_LOG("eglGetProcAddress" |
| 443 << "(" << procname << ")"); |
| 444 __eglMustCastToProperFunctionPointerType result = |
| 445 g_driver_egl.debug_fn.eglGetProcAddressFn(procname); |
| 446 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 447 return result; |
| 448 } |
| 449 |
| 450 static EGLBoolean GL_BINDING_CALL Debug_eglGetSyncAttribKHR(EGLDisplay dpy, |
| 451 EGLSyncKHR sync, |
| 452 EGLint attribute, |
| 453 EGLint* value) { |
| 454 GL_SERVICE_LOG("eglGetSyncAttribKHR" |
| 455 << "(" << dpy << ", " << sync << ", " << attribute << ", " |
| 456 << static_cast<const void*>(value) << ")"); |
| 457 EGLBoolean result = |
| 458 g_driver_egl.debug_fn.eglGetSyncAttribKHRFn(dpy, sync, attribute, value); |
| 459 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 460 return result; |
| 461 } |
| 462 |
| 463 static EGLBoolean GL_BINDING_CALL |
| 464 Debug_eglGetSyncValuesCHROMIUM(EGLDisplay dpy, |
| 465 EGLSurface surface, |
| 466 EGLuint64CHROMIUM* ust, |
| 467 EGLuint64CHROMIUM* msc, |
| 468 EGLuint64CHROMIUM* sbc) { |
| 469 GL_SERVICE_LOG("eglGetSyncValuesCHROMIUM" |
| 470 << "(" << dpy << ", " << surface << ", " |
| 471 << static_cast<const void*>(ust) << ", " |
| 472 << static_cast<const void*>(msc) << ", " |
| 473 << static_cast<const void*>(sbc) << ")"); |
| 474 EGLBoolean result = g_driver_egl.debug_fn.eglGetSyncValuesCHROMIUMFn( |
| 475 dpy, surface, ust, msc, sbc); |
| 476 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 477 return result; |
| 478 } |
| 479 |
| 480 static EGLBoolean GL_BINDING_CALL |
| 481 Debug_eglInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor) { |
| 482 GL_SERVICE_LOG("eglInitialize" |
| 483 << "(" << dpy << ", " << static_cast<const void*>(major) |
| 484 << ", " << static_cast<const void*>(minor) << ")"); |
| 485 EGLBoolean result = g_driver_egl.debug_fn.eglInitializeFn(dpy, major, minor); |
| 486 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 487 return result; |
| 488 } |
| 489 |
| 490 static EGLBoolean GL_BINDING_CALL Debug_eglMakeCurrent(EGLDisplay dpy, |
| 491 EGLSurface draw, |
| 492 EGLSurface read, |
| 493 EGLContext ctx) { |
| 494 GL_SERVICE_LOG("eglMakeCurrent" |
| 495 << "(" << dpy << ", " << draw << ", " << read << ", " << ctx |
| 496 << ")"); |
| 497 EGLBoolean result = |
| 498 g_driver_egl.debug_fn.eglMakeCurrentFn(dpy, draw, read, ctx); |
| 499 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 500 return result; |
| 501 } |
| 502 |
| 503 static EGLBoolean GL_BINDING_CALL Debug_eglPostSubBufferNV(EGLDisplay dpy, |
| 504 EGLSurface surface, |
| 505 EGLint x, |
| 506 EGLint y, |
| 507 EGLint width, |
| 508 EGLint height) { |
| 509 GL_SERVICE_LOG("eglPostSubBufferNV" |
| 510 << "(" << dpy << ", " << surface << ", " << x << ", " << y |
| 511 << ", " << width << ", " << height << ")"); |
| 512 EGLBoolean result = g_driver_egl.debug_fn.eglPostSubBufferNVFn( |
| 513 dpy, surface, x, y, width, height); |
| 514 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 515 return result; |
| 516 } |
| 517 |
| 518 static EGLenum GL_BINDING_CALL Debug_eglQueryAPI(void) { |
| 519 GL_SERVICE_LOG("eglQueryAPI" |
| 520 << "(" |
| 521 << ")"); |
| 522 EGLenum result = g_driver_egl.debug_fn.eglQueryAPIFn(); |
| 523 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 524 return result; |
| 525 } |
| 526 |
| 527 static EGLBoolean GL_BINDING_CALL Debug_eglQueryContext(EGLDisplay dpy, |
| 528 EGLContext ctx, |
| 529 EGLint attribute, |
| 530 EGLint* value) { |
| 531 GL_SERVICE_LOG("eglQueryContext" |
| 532 << "(" << dpy << ", " << ctx << ", " << attribute << ", " |
| 533 << static_cast<const void*>(value) << ")"); |
| 534 EGLBoolean result = |
| 535 g_driver_egl.debug_fn.eglQueryContextFn(dpy, ctx, attribute, value); |
| 536 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 537 return result; |
| 538 } |
| 539 |
| 540 static const char* GL_BINDING_CALL |
| 541 Debug_eglQueryString(EGLDisplay dpy, EGLint name) { |
| 542 GL_SERVICE_LOG("eglQueryString" |
| 543 << "(" << dpy << ", " << name << ")"); |
| 544 const char* result = g_driver_egl.debug_fn.eglQueryStringFn(dpy, name); |
| 545 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 546 return result; |
| 547 } |
| 548 |
| 549 static EGLBoolean GL_BINDING_CALL Debug_eglQuerySurface(EGLDisplay dpy, |
| 550 EGLSurface surface, |
| 551 EGLint attribute, |
| 552 EGLint* value) { |
| 553 GL_SERVICE_LOG("eglQuerySurface" |
| 554 << "(" << dpy << ", " << surface << ", " << attribute << ", " |
| 555 << static_cast<const void*>(value) << ")"); |
| 556 EGLBoolean result = |
| 557 g_driver_egl.debug_fn.eglQuerySurfaceFn(dpy, surface, attribute, value); |
| 558 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 559 return result; |
| 560 } |
| 561 |
| 562 static EGLBoolean GL_BINDING_CALL |
| 563 Debug_eglQuerySurfacePointerANGLE(EGLDisplay dpy, |
| 564 EGLSurface surface, |
| 565 EGLint attribute, |
| 566 void** value) { |
| 567 GL_SERVICE_LOG("eglQuerySurfacePointerANGLE" |
| 568 << "(" << dpy << ", " << surface << ", " << attribute << ", " |
| 569 << value << ")"); |
| 570 EGLBoolean result = g_driver_egl.debug_fn.eglQuerySurfacePointerANGLEFn( |
| 571 dpy, surface, attribute, value); |
| 572 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 573 return result; |
| 574 } |
| 575 |
| 576 static EGLBoolean GL_BINDING_CALL |
| 577 Debug_eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) { |
| 578 GL_SERVICE_LOG("eglReleaseTexImage" |
| 579 << "(" << dpy << ", " << surface << ", " << buffer << ")"); |
| 580 EGLBoolean result = |
| 581 g_driver_egl.debug_fn.eglReleaseTexImageFn(dpy, surface, buffer); |
| 582 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 583 return result; |
| 584 } |
| 585 |
| 586 static EGLBoolean GL_BINDING_CALL Debug_eglReleaseThread(void) { |
| 587 GL_SERVICE_LOG("eglReleaseThread" |
| 588 << "(" |
| 589 << ")"); |
| 590 EGLBoolean result = g_driver_egl.debug_fn.eglReleaseThreadFn(); |
| 591 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 592 return result; |
| 593 } |
| 594 |
| 595 static EGLBoolean GL_BINDING_CALL Debug_eglSurfaceAttrib(EGLDisplay dpy, |
| 596 EGLSurface surface, |
| 597 EGLint attribute, |
| 598 EGLint value) { |
| 599 GL_SERVICE_LOG("eglSurfaceAttrib" |
| 600 << "(" << dpy << ", " << surface << ", " << attribute << ", " |
| 601 << value << ")"); |
| 602 EGLBoolean result = |
| 603 g_driver_egl.debug_fn.eglSurfaceAttribFn(dpy, surface, attribute, value); |
| 604 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 605 return result; |
| 606 } |
| 607 |
| 608 static EGLBoolean GL_BINDING_CALL |
| 609 Debug_eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) { |
| 610 GL_SERVICE_LOG("eglSwapBuffers" |
| 611 << "(" << dpy << ", " << surface << ")"); |
| 612 EGLBoolean result = g_driver_egl.debug_fn.eglSwapBuffersFn(dpy, surface); |
| 613 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 614 return result; |
| 615 } |
| 616 |
| 617 static EGLBoolean GL_BINDING_CALL |
| 618 Debug_eglSwapInterval(EGLDisplay dpy, EGLint interval) { |
| 619 GL_SERVICE_LOG("eglSwapInterval" |
| 620 << "(" << dpy << ", " << interval << ")"); |
| 621 EGLBoolean result = g_driver_egl.debug_fn.eglSwapIntervalFn(dpy, interval); |
| 622 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 623 return result; |
| 624 } |
| 625 |
| 626 static EGLBoolean GL_BINDING_CALL Debug_eglTerminate(EGLDisplay dpy) { |
| 627 GL_SERVICE_LOG("eglTerminate" |
| 628 << "(" << dpy << ")"); |
| 629 EGLBoolean result = g_driver_egl.debug_fn.eglTerminateFn(dpy); |
| 630 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 631 return result; |
| 632 } |
| 633 |
| 634 static EGLBoolean GL_BINDING_CALL Debug_eglWaitClient(void) { |
| 635 GL_SERVICE_LOG("eglWaitClient" |
| 636 << "(" |
| 637 << ")"); |
| 638 EGLBoolean result = g_driver_egl.debug_fn.eglWaitClientFn(); |
| 639 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 640 return result; |
| 641 } |
| 642 |
| 643 static EGLBoolean GL_BINDING_CALL Debug_eglWaitGL(void) { |
| 644 GL_SERVICE_LOG("eglWaitGL" |
| 645 << "(" |
| 646 << ")"); |
| 647 EGLBoolean result = g_driver_egl.debug_fn.eglWaitGLFn(); |
| 648 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 649 return result; |
| 650 } |
| 651 |
| 652 static EGLBoolean GL_BINDING_CALL Debug_eglWaitNative(EGLint engine) { |
| 653 GL_SERVICE_LOG("eglWaitNative" |
| 654 << "(" << engine << ")"); |
| 655 EGLBoolean result = g_driver_egl.debug_fn.eglWaitNativeFn(engine); |
| 656 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 657 return result; |
| 658 } |
| 659 |
| 660 static EGLint GL_BINDING_CALL |
| 661 Debug_eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags) { |
| 662 GL_SERVICE_LOG("eglWaitSyncKHR" |
| 663 << "(" << dpy << ", " << sync << ", " << flags << ")"); |
| 664 EGLint result = g_driver_egl.debug_fn.eglWaitSyncKHRFn(dpy, sync, flags); |
| 665 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 666 return result; |
| 667 } |
| 668 } // extern "C" |
| 669 |
| 670 void DriverEGL::InitializeDebugBindings() { |
| 671 if (!debug_fn.eglBindAPIFn) { |
| 672 debug_fn.eglBindAPIFn = fn.eglBindAPIFn; |
| 673 fn.eglBindAPIFn = Debug_eglBindAPI; |
| 674 } |
| 675 if (!debug_fn.eglBindTexImageFn) { |
| 676 debug_fn.eglBindTexImageFn = fn.eglBindTexImageFn; |
| 677 fn.eglBindTexImageFn = Debug_eglBindTexImage; |
| 678 } |
| 679 if (!debug_fn.eglChooseConfigFn) { |
| 680 debug_fn.eglChooseConfigFn = fn.eglChooseConfigFn; |
| 681 fn.eglChooseConfigFn = Debug_eglChooseConfig; |
| 682 } |
| 683 if (!debug_fn.eglClientWaitSyncKHRFn) { |
| 684 debug_fn.eglClientWaitSyncKHRFn = fn.eglClientWaitSyncKHRFn; |
| 685 fn.eglClientWaitSyncKHRFn = Debug_eglClientWaitSyncKHR; |
| 686 } |
| 687 if (!debug_fn.eglCopyBuffersFn) { |
| 688 debug_fn.eglCopyBuffersFn = fn.eglCopyBuffersFn; |
| 689 fn.eglCopyBuffersFn = Debug_eglCopyBuffers; |
| 690 } |
| 691 if (!debug_fn.eglCreateContextFn) { |
| 692 debug_fn.eglCreateContextFn = fn.eglCreateContextFn; |
| 693 fn.eglCreateContextFn = Debug_eglCreateContext; |
| 694 } |
| 695 if (!debug_fn.eglCreateImageKHRFn) { |
| 696 debug_fn.eglCreateImageKHRFn = fn.eglCreateImageKHRFn; |
| 697 fn.eglCreateImageKHRFn = Debug_eglCreateImageKHR; |
| 698 } |
| 699 if (!debug_fn.eglCreatePbufferFromClientBufferFn) { |
| 700 debug_fn.eglCreatePbufferFromClientBufferFn = |
| 701 fn.eglCreatePbufferFromClientBufferFn; |
| 702 fn.eglCreatePbufferFromClientBufferFn = |
| 703 Debug_eglCreatePbufferFromClientBuffer; |
| 704 } |
| 705 if (!debug_fn.eglCreatePbufferSurfaceFn) { |
| 706 debug_fn.eglCreatePbufferSurfaceFn = fn.eglCreatePbufferSurfaceFn; |
| 707 fn.eglCreatePbufferSurfaceFn = Debug_eglCreatePbufferSurface; |
| 708 } |
| 709 if (!debug_fn.eglCreatePixmapSurfaceFn) { |
| 710 debug_fn.eglCreatePixmapSurfaceFn = fn.eglCreatePixmapSurfaceFn; |
| 711 fn.eglCreatePixmapSurfaceFn = Debug_eglCreatePixmapSurface; |
| 712 } |
| 713 if (!debug_fn.eglCreateSyncKHRFn) { |
| 714 debug_fn.eglCreateSyncKHRFn = fn.eglCreateSyncKHRFn; |
| 715 fn.eglCreateSyncKHRFn = Debug_eglCreateSyncKHR; |
| 716 } |
| 717 if (!debug_fn.eglCreateWindowSurfaceFn) { |
| 718 debug_fn.eglCreateWindowSurfaceFn = fn.eglCreateWindowSurfaceFn; |
| 719 fn.eglCreateWindowSurfaceFn = Debug_eglCreateWindowSurface; |
| 720 } |
| 721 if (!debug_fn.eglDestroyContextFn) { |
| 722 debug_fn.eglDestroyContextFn = fn.eglDestroyContextFn; |
| 723 fn.eglDestroyContextFn = Debug_eglDestroyContext; |
| 724 } |
| 725 if (!debug_fn.eglDestroyImageKHRFn) { |
| 726 debug_fn.eglDestroyImageKHRFn = fn.eglDestroyImageKHRFn; |
| 727 fn.eglDestroyImageKHRFn = Debug_eglDestroyImageKHR; |
| 728 } |
| 729 if (!debug_fn.eglDestroySurfaceFn) { |
| 730 debug_fn.eglDestroySurfaceFn = fn.eglDestroySurfaceFn; |
| 731 fn.eglDestroySurfaceFn = Debug_eglDestroySurface; |
| 732 } |
| 733 if (!debug_fn.eglDestroySyncKHRFn) { |
| 734 debug_fn.eglDestroySyncKHRFn = fn.eglDestroySyncKHRFn; |
| 735 fn.eglDestroySyncKHRFn = Debug_eglDestroySyncKHR; |
| 736 } |
| 737 if (!debug_fn.eglGetConfigAttribFn) { |
| 738 debug_fn.eglGetConfigAttribFn = fn.eglGetConfigAttribFn; |
| 739 fn.eglGetConfigAttribFn = Debug_eglGetConfigAttrib; |
| 740 } |
| 741 if (!debug_fn.eglGetConfigsFn) { |
| 742 debug_fn.eglGetConfigsFn = fn.eglGetConfigsFn; |
| 743 fn.eglGetConfigsFn = Debug_eglGetConfigs; |
| 744 } |
| 745 if (!debug_fn.eglGetCurrentContextFn) { |
| 746 debug_fn.eglGetCurrentContextFn = fn.eglGetCurrentContextFn; |
| 747 fn.eglGetCurrentContextFn = Debug_eglGetCurrentContext; |
| 748 } |
| 749 if (!debug_fn.eglGetCurrentDisplayFn) { |
| 750 debug_fn.eglGetCurrentDisplayFn = fn.eglGetCurrentDisplayFn; |
| 751 fn.eglGetCurrentDisplayFn = Debug_eglGetCurrentDisplay; |
| 752 } |
| 753 if (!debug_fn.eglGetCurrentSurfaceFn) { |
| 754 debug_fn.eglGetCurrentSurfaceFn = fn.eglGetCurrentSurfaceFn; |
| 755 fn.eglGetCurrentSurfaceFn = Debug_eglGetCurrentSurface; |
| 756 } |
| 757 if (!debug_fn.eglGetDisplayFn) { |
| 758 debug_fn.eglGetDisplayFn = fn.eglGetDisplayFn; |
| 759 fn.eglGetDisplayFn = Debug_eglGetDisplay; |
| 760 } |
| 761 if (!debug_fn.eglGetErrorFn) { |
| 762 debug_fn.eglGetErrorFn = fn.eglGetErrorFn; |
| 763 fn.eglGetErrorFn = Debug_eglGetError; |
| 764 } |
| 765 if (!debug_fn.eglGetPlatformDisplayEXTFn) { |
| 766 debug_fn.eglGetPlatformDisplayEXTFn = fn.eglGetPlatformDisplayEXTFn; |
| 767 fn.eglGetPlatformDisplayEXTFn = Debug_eglGetPlatformDisplayEXT; |
| 768 } |
| 769 if (!debug_fn.eglGetProcAddressFn) { |
| 770 debug_fn.eglGetProcAddressFn = fn.eglGetProcAddressFn; |
| 771 fn.eglGetProcAddressFn = Debug_eglGetProcAddress; |
| 772 } |
| 773 if (!debug_fn.eglGetSyncAttribKHRFn) { |
| 774 debug_fn.eglGetSyncAttribKHRFn = fn.eglGetSyncAttribKHRFn; |
| 775 fn.eglGetSyncAttribKHRFn = Debug_eglGetSyncAttribKHR; |
| 776 } |
| 777 if (!debug_fn.eglGetSyncValuesCHROMIUMFn) { |
| 778 debug_fn.eglGetSyncValuesCHROMIUMFn = fn.eglGetSyncValuesCHROMIUMFn; |
| 779 fn.eglGetSyncValuesCHROMIUMFn = Debug_eglGetSyncValuesCHROMIUM; |
| 780 } |
| 781 if (!debug_fn.eglInitializeFn) { |
| 782 debug_fn.eglInitializeFn = fn.eglInitializeFn; |
| 783 fn.eglInitializeFn = Debug_eglInitialize; |
| 784 } |
| 785 if (!debug_fn.eglMakeCurrentFn) { |
| 786 debug_fn.eglMakeCurrentFn = fn.eglMakeCurrentFn; |
| 787 fn.eglMakeCurrentFn = Debug_eglMakeCurrent; |
| 788 } |
| 789 if (!debug_fn.eglPostSubBufferNVFn) { |
| 790 debug_fn.eglPostSubBufferNVFn = fn.eglPostSubBufferNVFn; |
| 791 fn.eglPostSubBufferNVFn = Debug_eglPostSubBufferNV; |
| 792 } |
| 793 if (!debug_fn.eglQueryAPIFn) { |
| 794 debug_fn.eglQueryAPIFn = fn.eglQueryAPIFn; |
| 795 fn.eglQueryAPIFn = Debug_eglQueryAPI; |
| 796 } |
| 797 if (!debug_fn.eglQueryContextFn) { |
| 798 debug_fn.eglQueryContextFn = fn.eglQueryContextFn; |
| 799 fn.eglQueryContextFn = Debug_eglQueryContext; |
| 800 } |
| 801 if (!debug_fn.eglQueryStringFn) { |
| 802 debug_fn.eglQueryStringFn = fn.eglQueryStringFn; |
| 803 fn.eglQueryStringFn = Debug_eglQueryString; |
| 804 } |
| 805 if (!debug_fn.eglQuerySurfaceFn) { |
| 806 debug_fn.eglQuerySurfaceFn = fn.eglQuerySurfaceFn; |
| 807 fn.eglQuerySurfaceFn = Debug_eglQuerySurface; |
| 808 } |
| 809 if (!debug_fn.eglQuerySurfacePointerANGLEFn) { |
| 810 debug_fn.eglQuerySurfacePointerANGLEFn = fn.eglQuerySurfacePointerANGLEFn; |
| 811 fn.eglQuerySurfacePointerANGLEFn = Debug_eglQuerySurfacePointerANGLE; |
| 812 } |
| 813 if (!debug_fn.eglReleaseTexImageFn) { |
| 814 debug_fn.eglReleaseTexImageFn = fn.eglReleaseTexImageFn; |
| 815 fn.eglReleaseTexImageFn = Debug_eglReleaseTexImage; |
| 816 } |
| 817 if (!debug_fn.eglReleaseThreadFn) { |
| 818 debug_fn.eglReleaseThreadFn = fn.eglReleaseThreadFn; |
| 819 fn.eglReleaseThreadFn = Debug_eglReleaseThread; |
| 820 } |
| 821 if (!debug_fn.eglSurfaceAttribFn) { |
| 822 debug_fn.eglSurfaceAttribFn = fn.eglSurfaceAttribFn; |
| 823 fn.eglSurfaceAttribFn = Debug_eglSurfaceAttrib; |
| 824 } |
| 825 if (!debug_fn.eglSwapBuffersFn) { |
| 826 debug_fn.eglSwapBuffersFn = fn.eglSwapBuffersFn; |
| 827 fn.eglSwapBuffersFn = Debug_eglSwapBuffers; |
| 828 } |
| 829 if (!debug_fn.eglSwapIntervalFn) { |
| 830 debug_fn.eglSwapIntervalFn = fn.eglSwapIntervalFn; |
| 831 fn.eglSwapIntervalFn = Debug_eglSwapInterval; |
| 832 } |
| 833 if (!debug_fn.eglTerminateFn) { |
| 834 debug_fn.eglTerminateFn = fn.eglTerminateFn; |
| 835 fn.eglTerminateFn = Debug_eglTerminate; |
| 836 } |
| 837 if (!debug_fn.eglWaitClientFn) { |
| 838 debug_fn.eglWaitClientFn = fn.eglWaitClientFn; |
| 839 fn.eglWaitClientFn = Debug_eglWaitClient; |
| 840 } |
| 841 if (!debug_fn.eglWaitGLFn) { |
| 842 debug_fn.eglWaitGLFn = fn.eglWaitGLFn; |
| 843 fn.eglWaitGLFn = Debug_eglWaitGL; |
| 844 } |
| 845 if (!debug_fn.eglWaitNativeFn) { |
| 846 debug_fn.eglWaitNativeFn = fn.eglWaitNativeFn; |
| 847 fn.eglWaitNativeFn = Debug_eglWaitNative; |
| 848 } |
| 849 if (!debug_fn.eglWaitSyncKHRFn) { |
| 850 debug_fn.eglWaitSyncKHRFn = fn.eglWaitSyncKHRFn; |
| 851 fn.eglWaitSyncKHRFn = Debug_eglWaitSyncKHR; |
| 852 } |
| 853 g_debugBindingsInitialized = true; |
| 854 } |
| 855 |
| 856 void DriverEGL::ClearBindings() { |
| 857 memset(this, 0, sizeof(*this)); |
| 858 } |
| 859 |
| 860 EGLBoolean EGLApiBase::eglBindAPIFn(EGLenum api) { |
| 861 return driver_->fn.eglBindAPIFn(api); |
| 862 } |
| 863 |
| 864 EGLBoolean EGLApiBase::eglBindTexImageFn(EGLDisplay dpy, |
| 865 EGLSurface surface, |
| 866 EGLint buffer) { |
| 867 return driver_->fn.eglBindTexImageFn(dpy, surface, buffer); |
| 868 } |
| 869 |
| 870 EGLBoolean EGLApiBase::eglChooseConfigFn(EGLDisplay dpy, |
| 871 const EGLint* attrib_list, |
| 872 EGLConfig* configs, |
| 873 EGLint config_size, |
| 874 EGLint* num_config) { |
| 875 return driver_->fn.eglChooseConfigFn(dpy, attrib_list, configs, config_size, |
| 876 num_config); |
| 877 } |
| 878 |
| 879 EGLint EGLApiBase::eglClientWaitSyncKHRFn(EGLDisplay dpy, |
| 880 EGLSyncKHR sync, |
| 881 EGLint flags, |
| 882 EGLTimeKHR timeout) { |
| 883 return driver_->fn.eglClientWaitSyncKHRFn(dpy, sync, flags, timeout); |
| 884 } |
| 885 |
| 886 EGLBoolean EGLApiBase::eglCopyBuffersFn(EGLDisplay dpy, |
| 887 EGLSurface surface, |
| 888 EGLNativePixmapType target) { |
| 889 return driver_->fn.eglCopyBuffersFn(dpy, surface, target); |
| 890 } |
| 891 |
| 892 EGLContext EGLApiBase::eglCreateContextFn(EGLDisplay dpy, |
| 893 EGLConfig config, |
| 894 EGLContext share_context, |
| 895 const EGLint* attrib_list) { |
| 896 return driver_->fn.eglCreateContextFn(dpy, config, share_context, |
| 897 attrib_list); |
| 898 } |
| 899 |
| 900 EGLImageKHR EGLApiBase::eglCreateImageKHRFn(EGLDisplay dpy, |
| 901 EGLContext ctx, |
| 902 EGLenum target, |
| 903 EGLClientBuffer buffer, |
| 904 const EGLint* attrib_list) { |
| 905 return driver_->fn.eglCreateImageKHRFn(dpy, ctx, target, buffer, attrib_list); |
| 906 } |
| 907 |
| 908 EGLSurface EGLApiBase::eglCreatePbufferFromClientBufferFn( |
| 909 EGLDisplay dpy, |
| 910 EGLenum buftype, |
| 911 void* buffer, |
| 912 EGLConfig config, |
| 913 const EGLint* attrib_list) { |
| 914 return driver_->fn.eglCreatePbufferFromClientBufferFn(dpy, buftype, buffer, |
| 915 config, attrib_list); |
| 916 } |
| 917 |
| 918 EGLSurface EGLApiBase::eglCreatePbufferSurfaceFn(EGLDisplay dpy, |
| 919 EGLConfig config, |
| 920 const EGLint* attrib_list) { |
| 921 return driver_->fn.eglCreatePbufferSurfaceFn(dpy, config, attrib_list); |
| 922 } |
| 923 |
| 924 EGLSurface EGLApiBase::eglCreatePixmapSurfaceFn(EGLDisplay dpy, |
| 925 EGLConfig config, |
| 926 EGLNativePixmapType pixmap, |
| 927 const EGLint* attrib_list) { |
| 928 return driver_->fn.eglCreatePixmapSurfaceFn(dpy, config, pixmap, attrib_list); |
| 929 } |
| 930 |
| 931 EGLSyncKHR EGLApiBase::eglCreateSyncKHRFn(EGLDisplay dpy, |
| 932 EGLenum type, |
| 933 const EGLint* attrib_list) { |
| 934 return driver_->fn.eglCreateSyncKHRFn(dpy, type, attrib_list); |
| 935 } |
| 936 |
| 937 EGLSurface EGLApiBase::eglCreateWindowSurfaceFn(EGLDisplay dpy, |
| 938 EGLConfig config, |
| 939 EGLNativeWindowType win, |
| 940 const EGLint* attrib_list) { |
| 941 return driver_->fn.eglCreateWindowSurfaceFn(dpy, config, win, attrib_list); |
| 942 } |
| 943 |
| 944 EGLBoolean EGLApiBase::eglDestroyContextFn(EGLDisplay dpy, EGLContext ctx) { |
| 945 return driver_->fn.eglDestroyContextFn(dpy, ctx); |
| 946 } |
| 947 |
| 948 EGLBoolean EGLApiBase::eglDestroyImageKHRFn(EGLDisplay dpy, EGLImageKHR image) { |
| 949 return driver_->fn.eglDestroyImageKHRFn(dpy, image); |
| 950 } |
| 951 |
| 952 EGLBoolean EGLApiBase::eglDestroySurfaceFn(EGLDisplay dpy, EGLSurface surface) { |
| 953 return driver_->fn.eglDestroySurfaceFn(dpy, surface); |
| 954 } |
| 955 |
| 956 EGLBoolean EGLApiBase::eglDestroySyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync) { |
| 957 return driver_->fn.eglDestroySyncKHRFn(dpy, sync); |
| 958 } |
| 959 |
| 960 EGLBoolean EGLApiBase::eglGetConfigAttribFn(EGLDisplay dpy, |
| 961 EGLConfig config, |
| 962 EGLint attribute, |
| 963 EGLint* value) { |
| 964 return driver_->fn.eglGetConfigAttribFn(dpy, config, attribute, value); |
| 965 } |
| 966 |
| 967 EGLBoolean EGLApiBase::eglGetConfigsFn(EGLDisplay dpy, |
| 968 EGLConfig* configs, |
| 969 EGLint config_size, |
| 970 EGLint* num_config) { |
| 971 return driver_->fn.eglGetConfigsFn(dpy, configs, config_size, num_config); |
| 972 } |
| 973 |
| 974 EGLContext EGLApiBase::eglGetCurrentContextFn(void) { |
| 975 return driver_->fn.eglGetCurrentContextFn(); |
| 976 } |
| 977 |
| 978 EGLDisplay EGLApiBase::eglGetCurrentDisplayFn(void) { |
| 979 return driver_->fn.eglGetCurrentDisplayFn(); |
| 980 } |
| 981 |
| 982 EGLSurface EGLApiBase::eglGetCurrentSurfaceFn(EGLint readdraw) { |
| 983 return driver_->fn.eglGetCurrentSurfaceFn(readdraw); |
| 984 } |
| 985 |
| 986 EGLDisplay EGLApiBase::eglGetDisplayFn(EGLNativeDisplayType display_id) { |
| 987 return driver_->fn.eglGetDisplayFn(display_id); |
| 988 } |
| 989 |
| 990 EGLint EGLApiBase::eglGetErrorFn(void) { |
| 991 return driver_->fn.eglGetErrorFn(); |
| 992 } |
| 993 |
| 994 EGLDisplay EGLApiBase::eglGetPlatformDisplayEXTFn(EGLenum platform, |
| 995 void* native_display, |
| 996 const EGLint* attrib_list) { |
| 997 return driver_->fn.eglGetPlatformDisplayEXTFn(platform, native_display, |
| 998 attrib_list); |
| 999 } |
| 1000 |
| 1001 __eglMustCastToProperFunctionPointerType EGLApiBase::eglGetProcAddressFn( |
| 1002 const char* procname) { |
| 1003 return driver_->fn.eglGetProcAddressFn(procname); |
| 1004 } |
| 1005 |
| 1006 EGLBoolean EGLApiBase::eglGetSyncAttribKHRFn(EGLDisplay dpy, |
| 1007 EGLSyncKHR sync, |
| 1008 EGLint attribute, |
| 1009 EGLint* value) { |
| 1010 return driver_->fn.eglGetSyncAttribKHRFn(dpy, sync, attribute, value); |
| 1011 } |
| 1012 |
| 1013 EGLBoolean EGLApiBase::eglGetSyncValuesCHROMIUMFn(EGLDisplay dpy, |
| 1014 EGLSurface surface, |
| 1015 EGLuint64CHROMIUM* ust, |
| 1016 EGLuint64CHROMIUM* msc, |
| 1017 EGLuint64CHROMIUM* sbc) { |
| 1018 return driver_->fn.eglGetSyncValuesCHROMIUMFn(dpy, surface, ust, msc, sbc); |
| 1019 } |
| 1020 |
| 1021 EGLBoolean EGLApiBase::eglInitializeFn(EGLDisplay dpy, |
| 1022 EGLint* major, |
| 1023 EGLint* minor) { |
| 1024 return driver_->fn.eglInitializeFn(dpy, major, minor); |
| 1025 } |
| 1026 |
| 1027 EGLBoolean EGLApiBase::eglMakeCurrentFn(EGLDisplay dpy, |
| 1028 EGLSurface draw, |
| 1029 EGLSurface read, |
| 1030 EGLContext ctx) { |
| 1031 return driver_->fn.eglMakeCurrentFn(dpy, draw, read, ctx); |
| 1032 } |
| 1033 |
| 1034 EGLBoolean EGLApiBase::eglPostSubBufferNVFn(EGLDisplay dpy, |
| 1035 EGLSurface surface, |
| 1036 EGLint x, |
| 1037 EGLint y, |
| 1038 EGLint width, |
| 1039 EGLint height) { |
| 1040 return driver_->fn.eglPostSubBufferNVFn(dpy, surface, x, y, width, height); |
| 1041 } |
| 1042 |
| 1043 EGLenum EGLApiBase::eglQueryAPIFn(void) { |
| 1044 return driver_->fn.eglQueryAPIFn(); |
| 1045 } |
| 1046 |
| 1047 EGLBoolean EGLApiBase::eglQueryContextFn(EGLDisplay dpy, |
| 1048 EGLContext ctx, |
| 1049 EGLint attribute, |
| 1050 EGLint* value) { |
| 1051 return driver_->fn.eglQueryContextFn(dpy, ctx, attribute, value); |
| 1052 } |
| 1053 |
| 1054 const char* EGLApiBase::eglQueryStringFn(EGLDisplay dpy, EGLint name) { |
| 1055 return driver_->fn.eglQueryStringFn(dpy, name); |
| 1056 } |
| 1057 |
| 1058 EGLBoolean EGLApiBase::eglQuerySurfaceFn(EGLDisplay dpy, |
| 1059 EGLSurface surface, |
| 1060 EGLint attribute, |
| 1061 EGLint* value) { |
| 1062 return driver_->fn.eglQuerySurfaceFn(dpy, surface, attribute, value); |
| 1063 } |
| 1064 |
| 1065 EGLBoolean EGLApiBase::eglQuerySurfacePointerANGLEFn(EGLDisplay dpy, |
| 1066 EGLSurface surface, |
| 1067 EGLint attribute, |
| 1068 void** value) { |
| 1069 return driver_->fn.eglQuerySurfacePointerANGLEFn(dpy, surface, attribute, |
| 1070 value); |
| 1071 } |
| 1072 |
| 1073 EGLBoolean EGLApiBase::eglReleaseTexImageFn(EGLDisplay dpy, |
| 1074 EGLSurface surface, |
| 1075 EGLint buffer) { |
| 1076 return driver_->fn.eglReleaseTexImageFn(dpy, surface, buffer); |
| 1077 } |
| 1078 |
| 1079 EGLBoolean EGLApiBase::eglReleaseThreadFn(void) { |
| 1080 return driver_->fn.eglReleaseThreadFn(); |
| 1081 } |
| 1082 |
| 1083 EGLBoolean EGLApiBase::eglSurfaceAttribFn(EGLDisplay dpy, |
| 1084 EGLSurface surface, |
| 1085 EGLint attribute, |
| 1086 EGLint value) { |
| 1087 return driver_->fn.eglSurfaceAttribFn(dpy, surface, attribute, value); |
| 1088 } |
| 1089 |
| 1090 EGLBoolean EGLApiBase::eglSwapBuffersFn(EGLDisplay dpy, EGLSurface surface) { |
| 1091 return driver_->fn.eglSwapBuffersFn(dpy, surface); |
| 1092 } |
| 1093 |
| 1094 EGLBoolean EGLApiBase::eglSwapIntervalFn(EGLDisplay dpy, EGLint interval) { |
| 1095 return driver_->fn.eglSwapIntervalFn(dpy, interval); |
| 1096 } |
| 1097 |
| 1098 EGLBoolean EGLApiBase::eglTerminateFn(EGLDisplay dpy) { |
| 1099 return driver_->fn.eglTerminateFn(dpy); |
| 1100 } |
| 1101 |
| 1102 EGLBoolean EGLApiBase::eglWaitClientFn(void) { |
| 1103 return driver_->fn.eglWaitClientFn(); |
| 1104 } |
| 1105 |
| 1106 EGLBoolean EGLApiBase::eglWaitGLFn(void) { |
| 1107 return driver_->fn.eglWaitGLFn(); |
| 1108 } |
| 1109 |
| 1110 EGLBoolean EGLApiBase::eglWaitNativeFn(EGLint engine) { |
| 1111 return driver_->fn.eglWaitNativeFn(engine); |
| 1112 } |
| 1113 |
| 1114 EGLint EGLApiBase::eglWaitSyncKHRFn(EGLDisplay dpy, |
| 1115 EGLSyncKHR sync, |
| 1116 EGLint flags) { |
| 1117 return driver_->fn.eglWaitSyncKHRFn(dpy, sync, flags); |
| 1118 } |
| 1119 |
| 1120 EGLBoolean TraceEGLApi::eglBindAPIFn(EGLenum api) { |
| 1121 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglBindAPI") |
| 1122 return egl_api_->eglBindAPIFn(api); |
| 1123 } |
| 1124 |
| 1125 EGLBoolean TraceEGLApi::eglBindTexImageFn(EGLDisplay dpy, |
| 1126 EGLSurface surface, |
| 1127 EGLint buffer) { |
| 1128 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglBindTexImage") |
| 1129 return egl_api_->eglBindTexImageFn(dpy, surface, buffer); |
| 1130 } |
| 1131 |
| 1132 EGLBoolean TraceEGLApi::eglChooseConfigFn(EGLDisplay dpy, |
| 1133 const EGLint* attrib_list, |
| 1134 EGLConfig* configs, |
| 1135 EGLint config_size, |
| 1136 EGLint* num_config) { |
| 1137 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglChooseConfig") |
| 1138 return egl_api_->eglChooseConfigFn(dpy, attrib_list, configs, config_size, |
| 1139 num_config); |
| 1140 } |
| 1141 |
| 1142 EGLint TraceEGLApi::eglClientWaitSyncKHRFn(EGLDisplay dpy, |
| 1143 EGLSyncKHR sync, |
| 1144 EGLint flags, |
| 1145 EGLTimeKHR timeout) { |
| 1146 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglClientWaitSyncKHR") |
| 1147 return egl_api_->eglClientWaitSyncKHRFn(dpy, sync, flags, timeout); |
| 1148 } |
| 1149 |
| 1150 EGLBoolean TraceEGLApi::eglCopyBuffersFn(EGLDisplay dpy, |
| 1151 EGLSurface surface, |
| 1152 EGLNativePixmapType target) { |
| 1153 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglCopyBuffers") |
| 1154 return egl_api_->eglCopyBuffersFn(dpy, surface, target); |
| 1155 } |
| 1156 |
| 1157 EGLContext TraceEGLApi::eglCreateContextFn(EGLDisplay dpy, |
| 1158 EGLConfig config, |
| 1159 EGLContext share_context, |
| 1160 const EGLint* attrib_list) { |
| 1161 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglCreateContext") |
| 1162 return egl_api_->eglCreateContextFn(dpy, config, share_context, attrib_list); |
| 1163 } |
| 1164 |
| 1165 EGLImageKHR TraceEGLApi::eglCreateImageKHRFn(EGLDisplay dpy, |
| 1166 EGLContext ctx, |
| 1167 EGLenum target, |
| 1168 EGLClientBuffer buffer, |
| 1169 const EGLint* attrib_list) { |
| 1170 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglCreateImageKHR") |
| 1171 return egl_api_->eglCreateImageKHRFn(dpy, ctx, target, buffer, attrib_list); |
| 1172 } |
| 1173 |
| 1174 EGLSurface TraceEGLApi::eglCreatePbufferFromClientBufferFn( |
| 1175 EGLDisplay dpy, |
| 1176 EGLenum buftype, |
| 1177 void* buffer, |
| 1178 EGLConfig config, |
| 1179 const EGLint* attrib_list) { |
| 1180 TRACE_EVENT_BINARY_EFFICIENT0("gpu", |
| 1181 "TraceGLAPI::eglCreatePbufferFromClientBuffer") |
| 1182 return egl_api_->eglCreatePbufferFromClientBufferFn(dpy, buftype, buffer, |
| 1183 config, attrib_list); |
| 1184 } |
| 1185 |
| 1186 EGLSurface TraceEGLApi::eglCreatePbufferSurfaceFn(EGLDisplay dpy, |
| 1187 EGLConfig config, |
| 1188 const EGLint* attrib_list) { |
| 1189 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglCreatePbufferSurface") |
| 1190 return egl_api_->eglCreatePbufferSurfaceFn(dpy, config, attrib_list); |
| 1191 } |
| 1192 |
| 1193 EGLSurface TraceEGLApi::eglCreatePixmapSurfaceFn(EGLDisplay dpy, |
| 1194 EGLConfig config, |
| 1195 EGLNativePixmapType pixmap, |
| 1196 const EGLint* attrib_list) { |
| 1197 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglCreatePixmapSurface") |
| 1198 return egl_api_->eglCreatePixmapSurfaceFn(dpy, config, pixmap, attrib_list); |
| 1199 } |
| 1200 |
| 1201 EGLSyncKHR TraceEGLApi::eglCreateSyncKHRFn(EGLDisplay dpy, |
| 1202 EGLenum type, |
| 1203 const EGLint* attrib_list) { |
| 1204 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglCreateSyncKHR") |
| 1205 return egl_api_->eglCreateSyncKHRFn(dpy, type, attrib_list); |
| 1206 } |
| 1207 |
| 1208 EGLSurface TraceEGLApi::eglCreateWindowSurfaceFn(EGLDisplay dpy, |
| 1209 EGLConfig config, |
| 1210 EGLNativeWindowType win, |
| 1211 const EGLint* attrib_list) { |
| 1212 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglCreateWindowSurface") |
| 1213 return egl_api_->eglCreateWindowSurfaceFn(dpy, config, win, attrib_list); |
| 1214 } |
| 1215 |
| 1216 EGLBoolean TraceEGLApi::eglDestroyContextFn(EGLDisplay dpy, EGLContext ctx) { |
| 1217 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglDestroyContext") |
| 1218 return egl_api_->eglDestroyContextFn(dpy, ctx); |
| 1219 } |
| 1220 |
| 1221 EGLBoolean TraceEGLApi::eglDestroyImageKHRFn(EGLDisplay dpy, |
| 1222 EGLImageKHR image) { |
| 1223 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglDestroyImageKHR") |
| 1224 return egl_api_->eglDestroyImageKHRFn(dpy, image); |
| 1225 } |
| 1226 |
| 1227 EGLBoolean TraceEGLApi::eglDestroySurfaceFn(EGLDisplay dpy, |
| 1228 EGLSurface surface) { |
| 1229 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglDestroySurface") |
| 1230 return egl_api_->eglDestroySurfaceFn(dpy, surface); |
| 1231 } |
| 1232 |
| 1233 EGLBoolean TraceEGLApi::eglDestroySyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync) { |
| 1234 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglDestroySyncKHR") |
| 1235 return egl_api_->eglDestroySyncKHRFn(dpy, sync); |
| 1236 } |
| 1237 |
| 1238 EGLBoolean TraceEGLApi::eglGetConfigAttribFn(EGLDisplay dpy, |
| 1239 EGLConfig config, |
| 1240 EGLint attribute, |
| 1241 EGLint* value) { |
| 1242 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetConfigAttrib") |
| 1243 return egl_api_->eglGetConfigAttribFn(dpy, config, attribute, value); |
| 1244 } |
| 1245 |
| 1246 EGLBoolean TraceEGLApi::eglGetConfigsFn(EGLDisplay dpy, |
| 1247 EGLConfig* configs, |
| 1248 EGLint config_size, |
| 1249 EGLint* num_config) { |
| 1250 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetConfigs") |
| 1251 return egl_api_->eglGetConfigsFn(dpy, configs, config_size, num_config); |
| 1252 } |
| 1253 |
| 1254 EGLContext TraceEGLApi::eglGetCurrentContextFn(void) { |
| 1255 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetCurrentContext") |
| 1256 return egl_api_->eglGetCurrentContextFn(); |
| 1257 } |
| 1258 |
| 1259 EGLDisplay TraceEGLApi::eglGetCurrentDisplayFn(void) { |
| 1260 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetCurrentDisplay") |
| 1261 return egl_api_->eglGetCurrentDisplayFn(); |
| 1262 } |
| 1263 |
| 1264 EGLSurface TraceEGLApi::eglGetCurrentSurfaceFn(EGLint readdraw) { |
| 1265 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetCurrentSurface") |
| 1266 return egl_api_->eglGetCurrentSurfaceFn(readdraw); |
| 1267 } |
| 1268 |
| 1269 EGLDisplay TraceEGLApi::eglGetDisplayFn(EGLNativeDisplayType display_id) { |
| 1270 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetDisplay") |
| 1271 return egl_api_->eglGetDisplayFn(display_id); |
| 1272 } |
| 1273 |
| 1274 EGLint TraceEGLApi::eglGetErrorFn(void) { |
| 1275 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetError") |
| 1276 return egl_api_->eglGetErrorFn(); |
| 1277 } |
| 1278 |
| 1279 EGLDisplay TraceEGLApi::eglGetPlatformDisplayEXTFn(EGLenum platform, |
| 1280 void* native_display, |
| 1281 const EGLint* attrib_list) { |
| 1282 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetPlatformDisplayEXT") |
| 1283 return egl_api_->eglGetPlatformDisplayEXTFn(platform, native_display, |
| 1284 attrib_list); |
| 1285 } |
| 1286 |
| 1287 __eglMustCastToProperFunctionPointerType TraceEGLApi::eglGetProcAddressFn( |
| 1288 const char* procname) { |
| 1289 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetProcAddress") |
| 1290 return egl_api_->eglGetProcAddressFn(procname); |
| 1291 } |
| 1292 |
| 1293 EGLBoolean TraceEGLApi::eglGetSyncAttribKHRFn(EGLDisplay dpy, |
| 1294 EGLSyncKHR sync, |
| 1295 EGLint attribute, |
| 1296 EGLint* value) { |
| 1297 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetSyncAttribKHR") |
| 1298 return egl_api_->eglGetSyncAttribKHRFn(dpy, sync, attribute, value); |
| 1299 } |
| 1300 |
| 1301 EGLBoolean TraceEGLApi::eglGetSyncValuesCHROMIUMFn(EGLDisplay dpy, |
| 1302 EGLSurface surface, |
| 1303 EGLuint64CHROMIUM* ust, |
| 1304 EGLuint64CHROMIUM* msc, |
| 1305 EGLuint64CHROMIUM* sbc) { |
| 1306 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetSyncValuesCHROMIUM") |
| 1307 return egl_api_->eglGetSyncValuesCHROMIUMFn(dpy, surface, ust, msc, sbc); |
| 1308 } |
| 1309 |
| 1310 EGLBoolean TraceEGLApi::eglInitializeFn(EGLDisplay dpy, |
| 1311 EGLint* major, |
| 1312 EGLint* minor) { |
| 1313 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglInitialize") |
| 1314 return egl_api_->eglInitializeFn(dpy, major, minor); |
| 1315 } |
| 1316 |
| 1317 EGLBoolean TraceEGLApi::eglMakeCurrentFn(EGLDisplay dpy, |
| 1318 EGLSurface draw, |
| 1319 EGLSurface read, |
| 1320 EGLContext ctx) { |
| 1321 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglMakeCurrent") |
| 1322 return egl_api_->eglMakeCurrentFn(dpy, draw, read, ctx); |
| 1323 } |
| 1324 |
| 1325 EGLBoolean TraceEGLApi::eglPostSubBufferNVFn(EGLDisplay dpy, |
| 1326 EGLSurface surface, |
| 1327 EGLint x, |
| 1328 EGLint y, |
| 1329 EGLint width, |
| 1330 EGLint height) { |
| 1331 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglPostSubBufferNV") |
| 1332 return egl_api_->eglPostSubBufferNVFn(dpy, surface, x, y, width, height); |
| 1333 } |
| 1334 |
| 1335 EGLenum TraceEGLApi::eglQueryAPIFn(void) { |
| 1336 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglQueryAPI") |
| 1337 return egl_api_->eglQueryAPIFn(); |
| 1338 } |
| 1339 |
| 1340 EGLBoolean TraceEGLApi::eglQueryContextFn(EGLDisplay dpy, |
| 1341 EGLContext ctx, |
| 1342 EGLint attribute, |
| 1343 EGLint* value) { |
| 1344 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglQueryContext") |
| 1345 return egl_api_->eglQueryContextFn(dpy, ctx, attribute, value); |
| 1346 } |
| 1347 |
| 1348 const char* TraceEGLApi::eglQueryStringFn(EGLDisplay dpy, EGLint name) { |
| 1349 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglQueryString") |
| 1350 return egl_api_->eglQueryStringFn(dpy, name); |
| 1351 } |
| 1352 |
| 1353 EGLBoolean TraceEGLApi::eglQuerySurfaceFn(EGLDisplay dpy, |
| 1354 EGLSurface surface, |
| 1355 EGLint attribute, |
| 1356 EGLint* value) { |
| 1357 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglQuerySurface") |
| 1358 return egl_api_->eglQuerySurfaceFn(dpy, surface, attribute, value); |
| 1359 } |
| 1360 |
| 1361 EGLBoolean TraceEGLApi::eglQuerySurfacePointerANGLEFn(EGLDisplay dpy, |
| 1362 EGLSurface surface, |
| 1363 EGLint attribute, |
| 1364 void** value) { |
| 1365 TRACE_EVENT_BINARY_EFFICIENT0("gpu", |
| 1366 "TraceGLAPI::eglQuerySurfacePointerANGLE") |
| 1367 return egl_api_->eglQuerySurfacePointerANGLEFn(dpy, surface, attribute, |
| 1368 value); |
| 1369 } |
| 1370 |
| 1371 EGLBoolean TraceEGLApi::eglReleaseTexImageFn(EGLDisplay dpy, |
| 1372 EGLSurface surface, |
| 1373 EGLint buffer) { |
| 1374 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglReleaseTexImage") |
| 1375 return egl_api_->eglReleaseTexImageFn(dpy, surface, buffer); |
| 1376 } |
| 1377 |
| 1378 EGLBoolean TraceEGLApi::eglReleaseThreadFn(void) { |
| 1379 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglReleaseThread") |
| 1380 return egl_api_->eglReleaseThreadFn(); |
| 1381 } |
| 1382 |
| 1383 EGLBoolean TraceEGLApi::eglSurfaceAttribFn(EGLDisplay dpy, |
| 1384 EGLSurface surface, |
| 1385 EGLint attribute, |
| 1386 EGLint value) { |
| 1387 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglSurfaceAttrib") |
| 1388 return egl_api_->eglSurfaceAttribFn(dpy, surface, attribute, value); |
| 1389 } |
| 1390 |
| 1391 EGLBoolean TraceEGLApi::eglSwapBuffersFn(EGLDisplay dpy, EGLSurface surface) { |
| 1392 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglSwapBuffers") |
| 1393 return egl_api_->eglSwapBuffersFn(dpy, surface); |
| 1394 } |
| 1395 |
| 1396 EGLBoolean TraceEGLApi::eglSwapIntervalFn(EGLDisplay dpy, EGLint interval) { |
| 1397 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglSwapInterval") |
| 1398 return egl_api_->eglSwapIntervalFn(dpy, interval); |
| 1399 } |
| 1400 |
| 1401 EGLBoolean TraceEGLApi::eglTerminateFn(EGLDisplay dpy) { |
| 1402 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglTerminate") |
| 1403 return egl_api_->eglTerminateFn(dpy); |
| 1404 } |
| 1405 |
| 1406 EGLBoolean TraceEGLApi::eglWaitClientFn(void) { |
| 1407 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglWaitClient") |
| 1408 return egl_api_->eglWaitClientFn(); |
| 1409 } |
| 1410 |
| 1411 EGLBoolean TraceEGLApi::eglWaitGLFn(void) { |
| 1412 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglWaitGL") |
| 1413 return egl_api_->eglWaitGLFn(); |
| 1414 } |
| 1415 |
| 1416 EGLBoolean TraceEGLApi::eglWaitNativeFn(EGLint engine) { |
| 1417 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglWaitNative") |
| 1418 return egl_api_->eglWaitNativeFn(engine); |
| 1419 } |
| 1420 |
| 1421 EGLint TraceEGLApi::eglWaitSyncKHRFn(EGLDisplay dpy, |
| 1422 EGLSyncKHR sync, |
| 1423 EGLint flags) { |
| 1424 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglWaitSyncKHR") |
| 1425 return egl_api_->eglWaitSyncKHRFn(dpy, sync, flags); |
| 1426 } |
| 1427 |
| 1428 } // namespace gfx |
OLD | NEW |