summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2016-11-25 10:47:45 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-11-25 10:47:45 +0100
commit5ca2d76b78df1839b92b04d7d6e7710f5d402c98 (patch)
tree69cd30c70fff2cb66ff498f5a120d822ccc2eaac /src/core/web_engine_context.cpp
parentecfb3ba8a7eb116c838a1acd5b82ca59ce76b082 (diff)
parent6766290699acd0d73c81cf690012d52729e518b9 (diff)
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts: src/3rdparty Change-Id: Ib9c9eca457c1c42dab948e6cb56d44b57d5da32a
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r--src/core/web_engine_context.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 491835e45..227918d51 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -328,7 +328,14 @@ WebEngineContext::WebEngineContext()
#ifndef QT_NO_OPENGL
if (!usingANGLE() && !usingSoftwareDynamicGL() && !usingQtQuick2DRenderer()) {
if (qt_gl_global_share_context() && qt_gl_global_share_context()->isValid()) {
- if (!strcmp(qt_gl_global_share_context()->nativeHandle().typeName(), "QEGLNativeContext")) {
+ // If the native handle is QEGLNativeContext try to use GL ES/2, if there is no native handle
+ // assume we are using wayland and try GL ES/2, and finally Ozone demands GL ES/2 too.
+ if (qt_gl_global_share_context()->nativeHandle().isNull()
+#ifdef USE_OZONE
+ || true
+#endif
+ || !strcmp(qt_gl_global_share_context()->nativeHandle().typeName(), "QEGLNativeContext"))
+ {
if (qt_gl_global_share_context()->isOpenGLES()) {
glType = gl::kGLImplementationEGLName;
} else {