summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2016-11-21 11:33:06 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-11-21 11:33:06 +0100
commitb44962c8bce5489deee289212282cdf2c89b425a (patch)
tree796eeb5c5008a53d61e7cc970d90aed5e7d3b530 /src/core/web_engine_context.cpp
parent7a4324f5e4c3927b51e4176daf0d8ae6599c984a (diff)
parent15ded5ca62f53a01f85a52326f0b335a8a012bbd (diff)
Merge remote-tracking branch 'origin/5.7.1' into 5.7
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 0d1d7b127..39e11a96d 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -314,7 +314,14 @@ WebEngineContext::WebEngineContext()
const char *glType = 0;
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 = gfx::kGLImplementationEGLName;
} else {