diff options
author | Liang Qi <liang.qi@qt.io> | 2016-11-04 11:49:02 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-11-04 11:53:49 +0100 |
commit | 6189de6015764dd4a14774f2e08344c4cd085f69 (patch) | |
tree | aaadc8bf672ffde1d7bfa3080eeec416271a6c5c /src/core/web_engine_context.cpp | |
parent | ea2dafb7d07500e83b59fd708a9634a5e1135425 (diff) | |
parent | 6bb3d98e47d89790049edca796843345b8fd3c8b (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Also apply a4b04e4c on src/webengine/doc/src/qtwebengine-deploying.qdoc,
use the macro \macos.
Conflicts:
src/core/media_capture_devices_dispatcher.cpp
src/webengine/doc/src/qtwebengine-deploying.qdoc
src/webengine/doc/src/qtwebengine-platform-notes.qdoc
Change-Id: Ia6092a56bfe23da7c06f5389718ebbc9b78ef820
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r-- | src/core/web_engine_context.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index bf6a6a172..0d1d7b127 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -313,7 +313,7 @@ WebEngineContext::WebEngineContext() const char *glType = 0; if (!usingANGLE() && !usingSoftwareDynamicGL() && !usingQtQuick2DRenderer()) { - if (qt_gl_global_share_context()) { + if (qt_gl_global_share_context() && qt_gl_global_share_context()->isValid()) { if (!strcmp(qt_gl_global_share_context()->nativeHandle().typeName(), "QEGLNativeContext")) { if (qt_gl_global_share_context()->isOpenGLES()) { glType = gfx::kGLImplementationEGLName; @@ -347,16 +347,7 @@ WebEngineContext::WebEngineContext() glType = gfx::kGLImplementationDesktopName; } } else { - qWarning("WebEngineContext used before QtWebEngine::initialize()"); - // We have to assume the default OpenGL module type will be used. - switch (QOpenGLContext::openGLModuleType()) { - case QOpenGLContext::LibGL: - glType = gfx::kGLImplementationDesktopName; - break; - case QOpenGLContext::LibGLES: - glType = gfx::kGLImplementationEGLName; - break; - } + qWarning("WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed."); } } |