| OLD | NEW |
| 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 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 fn.eglCreateWindowSurfaceFn = reinterpret_cast<eglCreateWindowSurfaceProc>( | 51 fn.eglCreateWindowSurfaceFn = reinterpret_cast<eglCreateWindowSurfaceProc>( |
| 52 GetGLProcAddress("eglCreateWindowSurface")); | 52 GetGLProcAddress("eglCreateWindowSurface")); |
| 53 fn.eglDestroyContextFn = reinterpret_cast<eglDestroyContextProc>( | 53 fn.eglDestroyContextFn = reinterpret_cast<eglDestroyContextProc>( |
| 54 GetGLProcAddress("eglDestroyContext")); | 54 GetGLProcAddress("eglDestroyContext")); |
| 55 fn.eglDestroyImageKHRFn = 0; | 55 fn.eglDestroyImageKHRFn = 0; |
| 56 fn.eglDestroyStreamKHRFn = 0; | 56 fn.eglDestroyStreamKHRFn = 0; |
| 57 fn.eglDestroySurfaceFn = reinterpret_cast<eglDestroySurfaceProc>( | 57 fn.eglDestroySurfaceFn = reinterpret_cast<eglDestroySurfaceProc>( |
| 58 GetGLProcAddress("eglDestroySurface")); | 58 GetGLProcAddress("eglDestroySurface")); |
| 59 fn.eglDestroySyncKHRFn = reinterpret_cast<eglDestroySyncKHRProc>( | 59 fn.eglDestroySyncKHRFn = reinterpret_cast<eglDestroySyncKHRProc>( |
| 60 GetGLProcAddress("eglDestroySyncKHR")); | 60 GetGLProcAddress("eglDestroySyncKHR")); |
| 61 fn.eglDupNativeFenceFDANDROIDFn = 0; |
| 61 fn.eglGetConfigAttribFn = reinterpret_cast<eglGetConfigAttribProc>( | 62 fn.eglGetConfigAttribFn = reinterpret_cast<eglGetConfigAttribProc>( |
| 62 GetGLProcAddress("eglGetConfigAttrib")); | 63 GetGLProcAddress("eglGetConfigAttrib")); |
| 63 fn.eglGetConfigsFn = | 64 fn.eglGetConfigsFn = |
| 64 reinterpret_cast<eglGetConfigsProc>(GetGLProcAddress("eglGetConfigs")); | 65 reinterpret_cast<eglGetConfigsProc>(GetGLProcAddress("eglGetConfigs")); |
| 65 fn.eglGetCurrentContextFn = reinterpret_cast<eglGetCurrentContextProc>( | 66 fn.eglGetCurrentContextFn = reinterpret_cast<eglGetCurrentContextProc>( |
| 66 GetGLProcAddress("eglGetCurrentContext")); | 67 GetGLProcAddress("eglGetCurrentContext")); |
| 67 fn.eglGetCurrentDisplayFn = reinterpret_cast<eglGetCurrentDisplayProc>( | 68 fn.eglGetCurrentDisplayFn = reinterpret_cast<eglGetCurrentDisplayProc>( |
| 68 GetGLProcAddress("eglGetCurrentDisplay")); | 69 GetGLProcAddress("eglGetCurrentDisplay")); |
| 69 fn.eglGetCurrentSurfaceFn = reinterpret_cast<eglGetCurrentSurfaceProc>( | 70 fn.eglGetCurrentSurfaceFn = reinterpret_cast<eglGetCurrentSurfaceProc>( |
| 70 GetGLProcAddress("eglGetCurrentSurface")); | 71 GetGLProcAddress("eglGetCurrentSurface")); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 reinterpret_cast<eglGetPlatformDisplayEXTProc>( | 138 reinterpret_cast<eglGetPlatformDisplayEXTProc>( |
| 138 GetGLProcAddress("eglGetPlatformDisplayEXT")); | 139 GetGLProcAddress("eglGetPlatformDisplayEXT")); |
| 139 } | 140 } |
| 140 } | 141 } |
| 141 | 142 |
| 142 void DriverEGL::InitializeExtensionBindings() { | 143 void DriverEGL::InitializeExtensionBindings() { |
| 143 std::string extensions(GetPlatformExtensions()); | 144 std::string extensions(GetPlatformExtensions()); |
| 144 extensions += " "; | 145 extensions += " "; |
| 145 ALLOW_UNUSED_LOCAL(extensions); | 146 ALLOW_UNUSED_LOCAL(extensions); |
| 146 | 147 |
| 148 ext.b_EGL_ANDROID_native_fence_sync = |
| 149 extensions.find("EGL_ANDROID_native_fence_sync ") != std::string::npos; |
| 147 ext.b_EGL_ANGLE_d3d_share_handle_client_buffer = | 150 ext.b_EGL_ANGLE_d3d_share_handle_client_buffer = |
| 148 extensions.find("EGL_ANGLE_d3d_share_handle_client_buffer ") != | 151 extensions.find("EGL_ANGLE_d3d_share_handle_client_buffer ") != |
| 149 std::string::npos; | 152 std::string::npos; |
| 150 ext.b_EGL_ANGLE_query_surface_pointer = | 153 ext.b_EGL_ANGLE_query_surface_pointer = |
| 151 extensions.find("EGL_ANGLE_query_surface_pointer ") != std::string::npos; | 154 extensions.find("EGL_ANGLE_query_surface_pointer ") != std::string::npos; |
| 152 ext.b_EGL_ANGLE_stream_producer_d3d_texture_nv12 = | 155 ext.b_EGL_ANGLE_stream_producer_d3d_texture_nv12 = |
| 153 extensions.find("EGL_ANGLE_stream_producer_d3d_texture_nv12 ") != | 156 extensions.find("EGL_ANGLE_stream_producer_d3d_texture_nv12 ") != |
| 154 std::string::npos; | 157 std::string::npos; |
| 155 ext.b_EGL_ANGLE_surface_d3d_texture_2d_share_handle = | 158 ext.b_EGL_ANGLE_surface_d3d_texture_2d_share_handle = |
| 156 extensions.find("EGL_ANGLE_surface_d3d_texture_2d_share_handle ") != | 159 extensions.find("EGL_ANGLE_surface_d3d_texture_2d_share_handle ") != |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 fn.eglDestroyImageKHRFn = reinterpret_cast<eglDestroyImageKHRProc>( | 214 fn.eglDestroyImageKHRFn = reinterpret_cast<eglDestroyImageKHRProc>( |
| 212 GetGLProcAddress("eglDestroyImageKHR")); | 215 GetGLProcAddress("eglDestroyImageKHR")); |
| 213 } | 216 } |
| 214 | 217 |
| 215 debug_fn.eglDestroyStreamKHRFn = 0; | 218 debug_fn.eglDestroyStreamKHRFn = 0; |
| 216 if (ext.b_EGL_KHR_stream) { | 219 if (ext.b_EGL_KHR_stream) { |
| 217 fn.eglDestroyStreamKHRFn = reinterpret_cast<eglDestroyStreamKHRProc>( | 220 fn.eglDestroyStreamKHRFn = reinterpret_cast<eglDestroyStreamKHRProc>( |
| 218 GetGLProcAddress("eglDestroyStreamKHR")); | 221 GetGLProcAddress("eglDestroyStreamKHR")); |
| 219 } | 222 } |
| 220 | 223 |
| 224 debug_fn.eglDupNativeFenceFDANDROIDFn = 0; |
| 225 if (ext.b_EGL_ANDROID_native_fence_sync) { |
| 226 fn.eglDupNativeFenceFDANDROIDFn = |
| 227 reinterpret_cast<eglDupNativeFenceFDANDROIDProc>( |
| 228 GetGLProcAddress("eglDupNativeFenceFDANDROID")); |
| 229 } |
| 230 |
| 221 debug_fn.eglGetSyncValuesCHROMIUMFn = 0; | 231 debug_fn.eglGetSyncValuesCHROMIUMFn = 0; |
| 222 if (ext.b_EGL_CHROMIUM_sync_control) { | 232 if (ext.b_EGL_CHROMIUM_sync_control) { |
| 223 fn.eglGetSyncValuesCHROMIUMFn = | 233 fn.eglGetSyncValuesCHROMIUMFn = |
| 224 reinterpret_cast<eglGetSyncValuesCHROMIUMProc>( | 234 reinterpret_cast<eglGetSyncValuesCHROMIUMProc>( |
| 225 GetGLProcAddress("eglGetSyncValuesCHROMIUM")); | 235 GetGLProcAddress("eglGetSyncValuesCHROMIUM")); |
| 226 } | 236 } |
| 227 | 237 |
| 228 debug_fn.eglImageFlushExternalEXTFn = 0; | 238 debug_fn.eglImageFlushExternalEXTFn = 0; |
| 229 if (ext.b_EGL_EXT_image_flush_external) { | 239 if (ext.b_EGL_EXT_image_flush_external) { |
| 230 fn.eglImageFlushExternalEXTFn = | 240 fn.eglImageFlushExternalEXTFn = |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 static EGLBoolean GL_BINDING_CALL Debug_eglDestroySyncKHR(EGLDisplay dpy, | 571 static EGLBoolean GL_BINDING_CALL Debug_eglDestroySyncKHR(EGLDisplay dpy, |
| 562 EGLSyncKHR sync) { | 572 EGLSyncKHR sync) { |
| 563 GL_SERVICE_LOG("eglDestroySyncKHR" | 573 GL_SERVICE_LOG("eglDestroySyncKHR" |
| 564 << "(" << dpy << ", " << sync << ")"); | 574 << "(" << dpy << ", " << sync << ")"); |
| 565 DCHECK(g_driver_egl.debug_fn.eglDestroySyncKHRFn != nullptr); | 575 DCHECK(g_driver_egl.debug_fn.eglDestroySyncKHRFn != nullptr); |
| 566 EGLBoolean result = g_driver_egl.debug_fn.eglDestroySyncKHRFn(dpy, sync); | 576 EGLBoolean result = g_driver_egl.debug_fn.eglDestroySyncKHRFn(dpy, sync); |
| 567 GL_SERVICE_LOG("GL_RESULT: " << result); | 577 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 568 return result; | 578 return result; |
| 569 } | 579 } |
| 570 | 580 |
| 581 static EGLint GL_BINDING_CALL |
| 582 Debug_eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync) { |
| 583 GL_SERVICE_LOG("eglDupNativeFenceFDANDROID" |
| 584 << "(" << dpy << ", " << sync << ")"); |
| 585 DCHECK(g_driver_egl.debug_fn.eglDupNativeFenceFDANDROIDFn != nullptr); |
| 586 EGLint result = g_driver_egl.debug_fn.eglDupNativeFenceFDANDROIDFn(dpy, sync); |
| 587 GL_SERVICE_LOG("GL_RESULT: " << result); |
| 588 return result; |
| 589 } |
| 590 |
| 571 static EGLBoolean GL_BINDING_CALL Debug_eglGetConfigAttrib(EGLDisplay dpy, | 591 static EGLBoolean GL_BINDING_CALL Debug_eglGetConfigAttrib(EGLDisplay dpy, |
| 572 EGLConfig config, | 592 EGLConfig config, |
| 573 EGLint attribute, | 593 EGLint attribute, |
| 574 EGLint* value) { | 594 EGLint* value) { |
| 575 GL_SERVICE_LOG("eglGetConfigAttrib" | 595 GL_SERVICE_LOG("eglGetConfigAttrib" |
| 576 << "(" << dpy << ", " << config << ", " << attribute << ", " | 596 << "(" << dpy << ", " << config << ", " << attribute << ", " |
| 577 << static_cast<const void*>(value) << ")"); | 597 << static_cast<const void*>(value) << ")"); |
| 578 DCHECK(g_driver_egl.debug_fn.eglGetConfigAttribFn != nullptr); | 598 DCHECK(g_driver_egl.debug_fn.eglGetConfigAttribFn != nullptr); |
| 579 EGLBoolean result = | 599 EGLBoolean result = |
| 580 g_driver_egl.debug_fn.eglGetConfigAttribFn(dpy, config, attribute, value); | 600 g_driver_egl.debug_fn.eglGetConfigAttribFn(dpy, config, attribute, value); |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 fn.eglDestroyStreamKHRFn = Debug_eglDestroyStreamKHR; | 1149 fn.eglDestroyStreamKHRFn = Debug_eglDestroyStreamKHR; |
| 1130 } | 1150 } |
| 1131 if (!debug_fn.eglDestroySurfaceFn) { | 1151 if (!debug_fn.eglDestroySurfaceFn) { |
| 1132 debug_fn.eglDestroySurfaceFn = fn.eglDestroySurfaceFn; | 1152 debug_fn.eglDestroySurfaceFn = fn.eglDestroySurfaceFn; |
| 1133 fn.eglDestroySurfaceFn = Debug_eglDestroySurface; | 1153 fn.eglDestroySurfaceFn = Debug_eglDestroySurface; |
| 1134 } | 1154 } |
| 1135 if (!debug_fn.eglDestroySyncKHRFn) { | 1155 if (!debug_fn.eglDestroySyncKHRFn) { |
| 1136 debug_fn.eglDestroySyncKHRFn = fn.eglDestroySyncKHRFn; | 1156 debug_fn.eglDestroySyncKHRFn = fn.eglDestroySyncKHRFn; |
| 1137 fn.eglDestroySyncKHRFn = Debug_eglDestroySyncKHR; | 1157 fn.eglDestroySyncKHRFn = Debug_eglDestroySyncKHR; |
| 1138 } | 1158 } |
| 1159 if (!debug_fn.eglDupNativeFenceFDANDROIDFn) { |
| 1160 debug_fn.eglDupNativeFenceFDANDROIDFn = fn.eglDupNativeFenceFDANDROIDFn; |
| 1161 fn.eglDupNativeFenceFDANDROIDFn = Debug_eglDupNativeFenceFDANDROID; |
| 1162 } |
| 1139 if (!debug_fn.eglGetConfigAttribFn) { | 1163 if (!debug_fn.eglGetConfigAttribFn) { |
| 1140 debug_fn.eglGetConfigAttribFn = fn.eglGetConfigAttribFn; | 1164 debug_fn.eglGetConfigAttribFn = fn.eglGetConfigAttribFn; |
| 1141 fn.eglGetConfigAttribFn = Debug_eglGetConfigAttrib; | 1165 fn.eglGetConfigAttribFn = Debug_eglGetConfigAttrib; |
| 1142 } | 1166 } |
| 1143 if (!debug_fn.eglGetConfigsFn) { | 1167 if (!debug_fn.eglGetConfigsFn) { |
| 1144 debug_fn.eglGetConfigsFn = fn.eglGetConfigsFn; | 1168 debug_fn.eglGetConfigsFn = fn.eglGetConfigsFn; |
| 1145 fn.eglGetConfigsFn = Debug_eglGetConfigs; | 1169 fn.eglGetConfigsFn = Debug_eglGetConfigs; |
| 1146 } | 1170 } |
| 1147 if (!debug_fn.eglGetCurrentContextFn) { | 1171 if (!debug_fn.eglGetCurrentContextFn) { |
| 1148 debug_fn.eglGetCurrentContextFn = fn.eglGetCurrentContextFn; | 1172 debug_fn.eglGetCurrentContextFn = fn.eglGetCurrentContextFn; |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1416 } | 1440 } |
| 1417 | 1441 |
| 1418 EGLBoolean EGLApiBase::eglDestroySurfaceFn(EGLDisplay dpy, EGLSurface surface) { | 1442 EGLBoolean EGLApiBase::eglDestroySurfaceFn(EGLDisplay dpy, EGLSurface surface) { |
| 1419 return driver_->fn.eglDestroySurfaceFn(dpy, surface); | 1443 return driver_->fn.eglDestroySurfaceFn(dpy, surface); |
| 1420 } | 1444 } |
| 1421 | 1445 |
| 1422 EGLBoolean EGLApiBase::eglDestroySyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync) { | 1446 EGLBoolean EGLApiBase::eglDestroySyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync) { |
| 1423 return driver_->fn.eglDestroySyncKHRFn(dpy, sync); | 1447 return driver_->fn.eglDestroySyncKHRFn(dpy, sync); |
| 1424 } | 1448 } |
| 1425 | 1449 |
| 1450 EGLint EGLApiBase::eglDupNativeFenceFDANDROIDFn(EGLDisplay dpy, |
| 1451 EGLSyncKHR sync) { |
| 1452 return driver_->fn.eglDupNativeFenceFDANDROIDFn(dpy, sync); |
| 1453 } |
| 1454 |
| 1426 EGLBoolean EGLApiBase::eglGetConfigAttribFn(EGLDisplay dpy, | 1455 EGLBoolean EGLApiBase::eglGetConfigAttribFn(EGLDisplay dpy, |
| 1427 EGLConfig config, | 1456 EGLConfig config, |
| 1428 EGLint attribute, | 1457 EGLint attribute, |
| 1429 EGLint* value) { | 1458 EGLint* value) { |
| 1430 return driver_->fn.eglGetConfigAttribFn(dpy, config, attribute, value); | 1459 return driver_->fn.eglGetConfigAttribFn(dpy, config, attribute, value); |
| 1431 } | 1460 } |
| 1432 | 1461 |
| 1433 EGLBoolean EGLApiBase::eglGetConfigsFn(EGLDisplay dpy, | 1462 EGLBoolean EGLApiBase::eglGetConfigsFn(EGLDisplay dpy, |
| 1434 EGLConfig* configs, | 1463 EGLConfig* configs, |
| 1435 EGLint config_size, | 1464 EGLint config_size, |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1785 EGLSurface surface) { | 1814 EGLSurface surface) { |
| 1786 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglDestroySurface") | 1815 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglDestroySurface") |
| 1787 return egl_api_->eglDestroySurfaceFn(dpy, surface); | 1816 return egl_api_->eglDestroySurfaceFn(dpy, surface); |
| 1788 } | 1817 } |
| 1789 | 1818 |
| 1790 EGLBoolean TraceEGLApi::eglDestroySyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync) { | 1819 EGLBoolean TraceEGLApi::eglDestroySyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync) { |
| 1791 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglDestroySyncKHR") | 1820 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglDestroySyncKHR") |
| 1792 return egl_api_->eglDestroySyncKHRFn(dpy, sync); | 1821 return egl_api_->eglDestroySyncKHRFn(dpy, sync); |
| 1793 } | 1822 } |
| 1794 | 1823 |
| 1824 EGLint TraceEGLApi::eglDupNativeFenceFDANDROIDFn(EGLDisplay dpy, |
| 1825 EGLSyncKHR sync) { |
| 1826 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglDupNativeFenceFDANDROID") |
| 1827 return egl_api_->eglDupNativeFenceFDANDROIDFn(dpy, sync); |
| 1828 } |
| 1829 |
| 1795 EGLBoolean TraceEGLApi::eglGetConfigAttribFn(EGLDisplay dpy, | 1830 EGLBoolean TraceEGLApi::eglGetConfigAttribFn(EGLDisplay dpy, |
| 1796 EGLConfig config, | 1831 EGLConfig config, |
| 1797 EGLint attribute, | 1832 EGLint attribute, |
| 1798 EGLint* value) { | 1833 EGLint* value) { |
| 1799 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetConfigAttrib") | 1834 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglGetConfigAttrib") |
| 1800 return egl_api_->eglGetConfigAttribFn(dpy, config, attribute, value); | 1835 return egl_api_->eglGetConfigAttribFn(dpy, config, attribute, value); |
| 1801 } | 1836 } |
| 1802 | 1837 |
| 1803 EGLBoolean TraceEGLApi::eglGetConfigsFn(EGLDisplay dpy, | 1838 EGLBoolean TraceEGLApi::eglGetConfigsFn(EGLDisplay dpy, |
| 1804 EGLConfig* configs, | 1839 EGLConfig* configs, |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2060 } | 2095 } |
| 2061 | 2096 |
| 2062 EGLint TraceEGLApi::eglWaitSyncKHRFn(EGLDisplay dpy, | 2097 EGLint TraceEGLApi::eglWaitSyncKHRFn(EGLDisplay dpy, |
| 2063 EGLSyncKHR sync, | 2098 EGLSyncKHR sync, |
| 2064 EGLint flags) { | 2099 EGLint flags) { |
| 2065 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglWaitSyncKHR") | 2100 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglWaitSyncKHR") |
| 2066 return egl_api_->eglWaitSyncKHRFn(dpy, sync, flags); | 2101 return egl_api_->eglWaitSyncKHRFn(dpy, sync, flags); |
| 2067 } | 2102 } |
| 2068 | 2103 |
| 2069 } // namespace gl | 2104 } // namespace gl |
| OLD | NEW |