summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-02-20 12:43:12 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-02-21 14:06:27 +0000
commit025952a9673264c3557f6f7c195eebc11892e80a (patch)
tree780298f6d509cb3e5fe1a9c9b149f66f8bc798f3
parent488b8e8ed01018c155812e5cfb06162a5e216c7a (diff)
Fix embedded-linux -no-opengl build
Change-Id: Iad7f3f21918fc8727a6fac3733cb6e35f4e1c4b0 Reviewed-by: Karim Pinter <karim.pinter@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r--src/core/surface_factory_qt.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/surface_factory_qt.cpp b/src/core/surface_factory_qt.cpp
index 8c0bd6c82..f1eaf9667 100644
--- a/src/core/surface_factory_qt.cpp
+++ b/src/core/surface_factory_qt.cpp
@@ -56,10 +56,12 @@
#if defined(USE_OZONE)
#include <EGL/egl.h>
-#include <QOpenGLContext>
#include <dlfcn.h>
+#ifndef QT_NO_OPENGL
+#include <QOpenGLContext>
Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context();
+#endif
namespace QtWebEngineCore {
@@ -105,6 +107,7 @@ bool GLOzoneQt::LoadGLES2Bindings(gl::GLImplementation /*implementation*/)
reinterpret_cast<gl::GLGetProcAddressProc>(
base::GetFunctionPointerFromNativeLibrary(eglgles2Library,
"eglGetProcAddress"));
+#ifndef QT_NO_OPENGL
if (!get_proc_address) {
// QTBUG-63341 most likely libgles2 not linked with libegl -> fallback to qpa
if (QOpenGLContext *context = qt_gl_global_share_context()) {
@@ -112,6 +115,7 @@ bool GLOzoneQt::LoadGLES2Bindings(gl::GLImplementation /*implementation*/)
context->getProcAddress("eglGetProcAddress"));
}
}
+#endif
if (!get_proc_address) {
LOG(ERROR) << "eglGetProcAddress not found.";