| Index: ui/gl/gl_bindings_autogen_egl.cc
|
| diff --git a/ui/gl/gl_bindings_autogen_egl.cc b/ui/gl/gl_bindings_autogen_egl.cc
|
| index ed0a6cf5ab84bf78c54aa0e6066100373ac3928f..d29fc496a7b0316fef201f26144d472d1f481f3a 100644
|
| --- a/ui/gl/gl_bindings_autogen_egl.cc
|
| +++ b/ui/gl/gl_bindings_autogen_egl.cc
|
| @@ -58,6 +58,7 @@ void DriverEGL::InitializeStaticBindings() {
|
| GetGLProcAddress("eglDestroySurface"));
|
| fn.eglDestroySyncKHRFn = reinterpret_cast<eglDestroySyncKHRProc>(
|
| GetGLProcAddress("eglDestroySyncKHR"));
|
| + fn.eglDupNativeFenceFDANDROIDFn = 0;
|
| fn.eglGetConfigAttribFn = reinterpret_cast<eglGetConfigAttribProc>(
|
| GetGLProcAddress("eglGetConfigAttrib"));
|
| fn.eglGetConfigsFn =
|
| @@ -144,6 +145,8 @@ void DriverEGL::InitializeExtensionBindings() {
|
| extensions += " ";
|
| ALLOW_UNUSED_LOCAL(extensions);
|
|
|
| + ext.b_EGL_ANDROID_native_fence_sync =
|
| + extensions.find("EGL_ANDROID_native_fence_sync ") != std::string::npos;
|
| ext.b_EGL_ANGLE_d3d_share_handle_client_buffer =
|
| extensions.find("EGL_ANGLE_d3d_share_handle_client_buffer ") !=
|
| std::string::npos;
|
| @@ -218,6 +221,13 @@ void DriverEGL::InitializeExtensionBindings() {
|
| GetGLProcAddress("eglDestroyStreamKHR"));
|
| }
|
|
|
| + debug_fn.eglDupNativeFenceFDANDROIDFn = 0;
|
| + if (ext.b_EGL_ANDROID_native_fence_sync) {
|
| + fn.eglDupNativeFenceFDANDROIDFn =
|
| + reinterpret_cast<eglDupNativeFenceFDANDROIDProc>(
|
| + GetGLProcAddress("eglDupNativeFenceFDANDROID"));
|
| + }
|
| +
|
| debug_fn.eglGetSyncValuesCHROMIUMFn = 0;
|
| if (ext.b_EGL_CHROMIUM_sync_control) {
|
| fn.eglGetSyncValuesCHROMIUMFn =
|
| @@ -568,6 +578,16 @@ static EGLBoolean GL_BINDING_CALL Debug_eglDestroySyncKHR(EGLDisplay dpy,
|
| return result;
|
| }
|
|
|
| +static EGLint GL_BINDING_CALL
|
| +Debug_eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync) {
|
| + GL_SERVICE_LOG("eglDupNativeFenceFDANDROID"
|
| + << "(" << dpy << ", " << sync << ")");
|
| + DCHECK(g_driver_egl.debug_fn.eglDupNativeFenceFDANDROIDFn != nullptr);
|
| + EGLint result = g_driver_egl.debug_fn.eglDupNativeFenceFDANDROIDFn(dpy, sync);
|
| + GL_SERVICE_LOG("GL_RESULT: " << result);
|
| + return result;
|
| +}
|
| +
|
| static EGLBoolean GL_BINDING_CALL Debug_eglGetConfigAttrib(EGLDisplay dpy,
|
| EGLConfig config,
|
| EGLint attribute,
|
| @@ -1136,6 +1156,10 @@ void DriverEGL::InitializeDebugBindings() {
|
| debug_fn.eglDestroySyncKHRFn = fn.eglDestroySyncKHRFn;
|
| fn.eglDestroySyncKHRFn = Debug_eglDestroySyncKHR;
|
| }
|
| + if (!debug_fn.eglDupNativeFenceFDANDROIDFn) {
|
| + debug_fn.eglDupNativeFenceFDANDROIDFn = fn.eglDupNativeFenceFDANDROIDFn;
|
| + fn.eglDupNativeFenceFDANDROIDFn = Debug_eglDupNativeFenceFDANDROID;
|
| + }
|
| if (!debug_fn.eglGetConfigAttribFn) {
|
| debug_fn.eglGetConfigAttribFn = fn.eglGetConfigAttribFn;
|
| fn.eglGetConfigAttribFn = Debug_eglGetConfigAttrib;
|
| @@ -1423,6 +1447,11 @@ EGLBoolean EGLApiBase::eglDestroySyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync) {
|
| return driver_->fn.eglDestroySyncKHRFn(dpy, sync);
|
| }
|
|
|
| +EGLint EGLApiBase::eglDupNativeFenceFDANDROIDFn(EGLDisplay dpy,
|
| + EGLSyncKHR sync) {
|
| + return driver_->fn.eglDupNativeFenceFDANDROIDFn(dpy, sync);
|
| +}
|
| +
|
| EGLBoolean EGLApiBase::eglGetConfigAttribFn(EGLDisplay dpy,
|
| EGLConfig config,
|
| EGLint attribute,
|
| @@ -1792,6 +1821,12 @@ EGLBoolean TraceEGLApi::eglDestroySyncKHRFn(EGLDisplay dpy, EGLSyncKHR sync) {
|
| return egl_api_->eglDestroySyncKHRFn(dpy, sync);
|
| }
|
|
|
| +EGLint TraceEGLApi::eglDupNativeFenceFDANDROIDFn(EGLDisplay dpy,
|
| + EGLSyncKHR sync) {
|
| + TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::eglDupNativeFenceFDANDROID")
|
| + return egl_api_->eglDupNativeFenceFDANDROIDFn(dpy, sync);
|
| +}
|
| +
|
| EGLBoolean TraceEGLApi::eglGetConfigAttribFn(EGLDisplay dpy,
|
| EGLConfig config,
|
| EGLint attribute,
|
|
|