summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-01-12 11:32:02 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-01-12 11:35:45 +0100
commita077399f4c17f57e911334867c918cc6ddeb15fc (patch)
treec8e4d326d7a074e9d16b68399ecc5f728f8533fe /src/core/web_engine_context.cpp
parent3d698f5de377bde2293e222536bc50171cfdf1b8 (diff)
parent12dd6ff845656eb625e2ee3d0e73392bc2c61983 (diff)
Merge branch '5.6' into dev
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r--src/core/web_engine_context.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 4d1cbf3d4..dabee9179 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -84,6 +84,12 @@
#include <QVector>
#include <qpa/qplatformnativeinterface.h>
+using namespace QtWebEngineCore;
+
+QT_BEGIN_NAMESPACE
+Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context();
+QT_END_NAMESPACE
+
namespace {
scoped_refptr<QtWebEngineCore::WebEngineContext> sContext;
@@ -100,7 +106,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
@@ -246,14 +252,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);
}