Add fallback lookup for eglGetProcAddress Use the GLContext to find address for eglGetProcAddress symbol, if it's not found with dlopen. Index: qtwebengine-opensource-src-5.11.1+dfsg/src/core/gl_context_qt.cpp =================================================================== --- qtwebengine-opensource-src-5.11.1+dfsg.orig/src/core/gl_context_qt.cpp +++ qtwebengine-opensource-src-5.11.1+dfsg/src/core/gl_context_qt.cpp @@ -155,6 +155,17 @@ QFunctionPointer GLContextHelper::getGlX return get_proc_address; } +QFunctionPointer GLContextHelper::getEglGetProcAddress() +{ + QFunctionPointer get_proc_address = nullptr; +#ifndef QT_NO_OPENGL + if (QOpenGLContext *context = qt_gl_global_share_context()) { + get_proc_address = context->getProcAddress("eglGetProcAddress"); + } +#endif + return get_proc_address; +} + QT_END_NAMESPACE #if defined(USE_OZONE) || defined(OS_WIN) Index: qtwebengine-opensource-src-5.11.1+dfsg/src/core/gl_context_qt.h =================================================================== --- qtwebengine-opensource-src-5.11.1+dfsg.orig/src/core/gl_context_qt.h +++ qtwebengine-opensource-src-5.11.1+dfsg/src/core/gl_context_qt.h @@ -63,6 +63,7 @@ public: static void* getXDisplay(); static void* getNativeDisplay(); static QFunctionPointer getGlXGetProcAddress(); + static QFunctionPointer getEglGetProcAddress(); private: Q_INVOKABLE bool initializeContextOnBrowserThread(gl::GLContext* context, gl::GLSurface* surface, gl::GLContextAttribs attribs); Index: qtwebengine-opensource-src-5.11.1+dfsg/src/core/gl_surface_qt.cpp =================================================================== --- qtwebengine-opensource-src-5.11.1+dfsg.orig/src/core/gl_surface_qt.cpp +++ qtwebengine-opensource-src-5.11.1+dfsg/src/core/gl_surface_qt.cpp @@ -227,6 +227,10 @@ bool InitializeStaticGLBindings(GLImplem base::GetFunctionPointerFromNativeLibrary(library, "eglGetProcAddress")); if (!get_proc_address) { + QFunctionPointer address = GLContextHelper::getEglGetProcAddress(); + get_proc_address = reinterpret_cast(address); + } + if (!get_proc_address) { LOG(ERROR) << "eglGetProcAddress not found."; base::UnloadNativeLibrary(library); return false;