summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/compositor/content_gpu_client_qt.cpp2
-rw-r--r--src/core/ozone/gl_context_qt.cpp4
-rw-r--r--src/core/web_engine_context.cpp4
3 files changed, 8 insertions, 2 deletions
diff --git a/src/core/compositor/content_gpu_client_qt.cpp b/src/core/compositor/content_gpu_client_qt.cpp
index 8d7d5bce5..2c0f78548 100644
--- a/src/core/compositor/content_gpu_client_qt.cpp
+++ b/src/core/compositor/content_gpu_client_qt.cpp
@@ -52,9 +52,11 @@
#include <QGuiApplication>
#include <qpa/qplatformnativeinterface.h>
+#if QT_CONFIG(opengl)
QT_BEGIN_NAMESPACE
Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context();
QT_END_NAMESPACE
+#endif
namespace QtWebEngineCore {
diff --git a/src/core/ozone/gl_context_qt.cpp b/src/core/ozone/gl_context_qt.cpp
index 9a24f6bf4..0e7213a3a 100644
--- a/src/core/ozone/gl_context_qt.cpp
+++ b/src/core/ozone/gl_context_qt.cpp
@@ -51,8 +51,10 @@
#endif
QT_BEGIN_NAMESPACE
-
+#if QT_CONFIG(opengl)
Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context();
+#endif
+
GLContextHelper* GLContextHelper::contextHelper = 0;
namespace {
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index eb459fbdc..184f78c3b 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -637,6 +637,7 @@ WebEngineContext::WebEngineContext()
parsedCommandLine->AppendSwitch(switches::kEnableThreadedCompositing);
+#if QT_CONFIG(opengl)
#if defined(Q_OS_WIN)
// This switch is used in Chromium's gl_context_wgl.cc file to determine whether to create
// an OpenGL Core Profile context. If the switch is not set, it would always try to create a
@@ -659,7 +660,8 @@ WebEngineContext::WebEngineContext()
if (isDesktopGLOrSoftware || isGLES2Context)
parsedCommandLine->AppendSwitch(switches::kDisableES3GLContext);
-#endif
+#endif // defined(Q_OS_WIN)
+#endif // QT_CONFIG(opengl)
// Do not advertise a feature we have removed at compile time
parsedCommandLine->AppendSwitch(switches::kDisableSpeechAPI);