diff options
-rw-r--r-- | src/core/web_engine_context.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 12b8bdadb..9c8a6c757 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -85,6 +85,10 @@ using namespace QtWebEngineCore; +QT_BEGIN_NAMESPACE +Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context(); +QT_END_NAMESPACE + namespace { scoped_refptr<WebEngineContext> sContext; @@ -101,7 +105,7 @@ void destroyContext() bool usingANGLE() { #if defined(Q_OS_WIN) - return QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES; + return qt_gl_global_share_context()->isOpenGLES(); #else return false; #endif @@ -239,14 +243,12 @@ WebEngineContext::WebEngineContext() parsedCommandLine->AppendSwitch(switches::kDisableGpu); } else { const char *glType = 0; - switch (QOpenGLContext::openGLModuleType()) { - case QOpenGLContext::LibGL: - glType = gfx::kGLImplementationDesktopName; - break; - case QOpenGLContext::LibGLES: + if (qt_gl_global_share_context()->isOpenGLES()) { glType = gfx::kGLImplementationEGLName; - break; + } else { + glType = gfx::kGLImplementationDesktopName; } + parsedCommandLine->AppendSwitchASCII(switches::kUseGL, glType); } |