summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context.cpp
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@qt.io>2016-08-10 17:56:10 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-10-02 08:40:22 +0000
commit7d19f3b647f4e5ac4b5f0d2278703476f5a9ed1c (patch)
tree8f770c11fe270d71be7ab712ffc33df9d7bec53c /src/core/web_engine_context.cpp
parent2ec47c9921a1e381943159f540b45c105d2ff1db (diff)
Fix building when QT_NO_OPENGL is defined
Task-number: QTBUG-54327 Change-Id: I759598d56aa0a74b64092365b422a743fb508ac6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r--src/core/web_engine_context.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 368ad48e2..7fe8fb612 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -88,7 +88,9 @@
#include <QFileInfo>
#include <QGuiApplication>
#include <QOffscreenSurface>
-#include <QOpenGLContext>
+#ifndef QT_NO_OPENGL
+# include <QOpenGLContext>
+#endif
#include <QStringList>
#include <QSurfaceFormat>
#include <QVector>
@@ -96,9 +98,11 @@
using namespace QtWebEngineCore;
+#ifndef QT_NO_OPENGL
QT_BEGIN_NAMESPACE
Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context();
QT_END_NAMESPACE
+#endif
namespace {
@@ -115,6 +119,7 @@ void destroyContext()
s_destroyed = true;
}
+#ifndef QT_NO_OPENGL
bool usingANGLE()
{
#if defined(Q_OS_WIN)
@@ -160,7 +165,7 @@ bool usingQtQuick2DRenderer()
// Anything other than the default OpenGL device will need to render in 2D mode.
return device != QLatin1String("default");
}
-
+#endif //QT_NO_OPENGL
#if defined(ENABLE_PLUGINS)
void dummyGetPluginCallback(const std::vector<content::WebPluginInfo>&)
{
@@ -318,6 +323,7 @@ WebEngineContext::WebEngineContext()
GLContextHelper::initialize();
const char *glType = 0;
+#ifndef QT_NO_OPENGL
if (!usingANGLE() && !usingSoftwareDynamicGL() && !usingQtQuick2DRenderer()) {
if (qt_gl_global_share_context()) {
if (!strcmp(qt_gl_global_share_context()->nativeHandle().typeName(), "QEGLNativeContext")) {
@@ -365,6 +371,7 @@ WebEngineContext::WebEngineContext()
}
}
}
+#endif
if (glType)
parsedCommandLine->AppendSwitchASCII(switches::kUseGL, glType);