summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/minimalegl
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/minimalegl')
-rw-r--r--src/plugins/platforms/minimalegl/minimalegl.pro7
-rw-r--r--src/plugins/platforms/minimalegl/qminimaleglintegration.cpp12
-rw-r--r--src/plugins/platforms/minimalegl/qminimaleglintegration.h3
-rw-r--r--src/plugins/platforms/minimalegl/qminimaleglscreen.cpp14
-rw-r--r--src/plugins/platforms/minimalegl/qminimaleglscreen.h4
5 files changed, 29 insertions, 11 deletions
diff --git a/src/plugins/platforms/minimalegl/minimalegl.pro b/src/plugins/platforms/minimalegl/minimalegl.pro
index 88466e7f36..b7dde9069f 100644
--- a/src/plugins/platforms/minimalegl/minimalegl.pro
+++ b/src/plugins/platforms/minimalegl/minimalegl.pro
@@ -14,14 +14,17 @@ DEFINES += QT_EGL_NO_X11
SOURCES = main.cpp \
qminimaleglintegration.cpp \
qminimaleglwindow.cpp \
- qminimaleglbackingstore.cpp \
qminimaleglscreen.cpp
HEADERS = qminimaleglintegration.h \
qminimaleglwindow.h \
- qminimaleglbackingstore.h \
qminimaleglscreen.h
+qtConfig(opengl) {
+ SOURCES += qminimaleglbackingstore.cpp
+ HEADERS += qminimaleglbackingstore.h
+}
+
CONFIG += egl
OTHER_FILES += \
diff --git a/src/plugins/platforms/minimalegl/qminimaleglintegration.cpp b/src/plugins/platforms/minimalegl/qminimaleglintegration.cpp
index c564e1e431..81512b1561 100644
--- a/src/plugins/platforms/minimalegl/qminimaleglintegration.cpp
+++ b/src/plugins/platforms/minimalegl/qminimaleglintegration.cpp
@@ -40,8 +40,9 @@
#include "qminimaleglintegration.h"
#include "qminimaleglwindow.h"
-#include "qminimaleglbackingstore.h"
-
+#ifndef QT_NO_OPENGL
+# include "qminimaleglbackingstore.h"
+#endif
#include <QtFontDatabaseSupport/private/qgenericunixfontdatabase_p.h>
#if defined(Q_OS_UNIX)
@@ -127,13 +128,18 @@ QPlatformBackingStore *QMinimalEglIntegration::createPlatformBackingStore(QWindo
#ifdef QEGL_EXTRA_DEBUG
qWarning("QMinimalEglIntegration::createWindowSurface %p\n", window);
#endif
+#ifndef QT_NO_OPENGL
return new QMinimalEglBackingStore(window);
+#else
+ return nullptr;
+#endif
}
-
+#ifndef QT_NO_OPENGL
QPlatformOpenGLContext *QMinimalEglIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
{
return static_cast<QMinimalEglScreen *>(context->screen()->handle())->platformContext();
}
+#endif
QPlatformFontDatabase *QMinimalEglIntegration::fontDatabase() const
{
diff --git a/src/plugins/platforms/minimalegl/qminimaleglintegration.h b/src/plugins/platforms/minimalegl/qminimaleglintegration.h
index 529e89f85a..d0ab75bd3c 100644
--- a/src/plugins/platforms/minimalegl/qminimaleglintegration.h
+++ b/src/plugins/platforms/minimalegl/qminimaleglintegration.h
@@ -55,8 +55,9 @@ public:
QPlatformWindow *createPlatformWindow(QWindow *window) const Q_DECL_OVERRIDE;
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const Q_DECL_OVERRIDE;
+#ifndef QT_NO_OPENGL
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const Q_DECL_OVERRIDE;
-
+#endif
QPlatformFontDatabase *fontDatabase() const Q_DECL_OVERRIDE;
QAbstractEventDispatcher *createEventDispatcher() const Q_DECL_OVERRIDE;
diff --git a/src/plugins/platforms/minimalegl/qminimaleglscreen.cpp b/src/plugins/platforms/minimalegl/qminimaleglscreen.cpp
index d3d091fab7..0175d2dbdd 100644
--- a/src/plugins/platforms/minimalegl/qminimaleglscreen.cpp
+++ b/src/plugins/platforms/minimalegl/qminimaleglscreen.cpp
@@ -41,7 +41,9 @@
#include "qminimaleglwindow.h"
#include <QtEglSupport/private/qeglconvenience_p.h>
-#include <QtEglSupport/private/qeglplatformcontext_p.h>
+#ifndef QT_NO_OPENGL
+# include <QtEglSupport/private/qeglplatformcontext_p.h>
+#endif
#ifdef Q_OPENKODE
#include <KD/kd.h>
@@ -52,6 +54,8 @@ QT_BEGIN_NAMESPACE
// #define QEGL_EXTRA_DEBUG
+#ifndef QT_NO_OPENGL
+
class QMinimalEglContext : public QEGLPlatformContext
{
public:
@@ -68,6 +72,8 @@ public:
}
};
+#endif
+
QMinimalEglScreen::QMinimalEglScreen(EGLNativeDisplayType display)
: m_depth(32)
, m_format(QImage::Format_Invalid)
@@ -161,9 +167,10 @@ void QMinimalEglScreen::createAndSetPlatformContext()
}
// qWarning("Created surface %dx%d\n", w, h);
+#ifndef QT_NO_OPENGL
QEGLPlatformContext *platformContext = new QMinimalEglContext(platformFormat, 0, m_dpy);
m_platformContext = platformContext;
-
+#endif
EGLint w,h; // screen size detection
eglQuerySurface(m_dpy, m_surface, EGL_WIDTH, &w);
eglQuerySurface(m_dpy, m_surface, EGL_HEIGHT, &h);
@@ -191,6 +198,7 @@ QImage::Format QMinimalEglScreen::format() const
createAndSetPlatformContext();
return m_format;
}
+#ifndef QT_NO_OPENGL
QPlatformOpenGLContext *QMinimalEglScreen::platformContext() const
{
if (!m_platformContext) {
@@ -199,5 +207,5 @@ QPlatformOpenGLContext *QMinimalEglScreen::platformContext() const
}
return m_platformContext;
}
-
+#endif
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/minimalegl/qminimaleglscreen.h b/src/plugins/platforms/minimalegl/qminimaleglscreen.h
index ba605835a8..24098b8127 100644
--- a/src/plugins/platforms/minimalegl/qminimaleglscreen.h
+++ b/src/plugins/platforms/minimalegl/qminimaleglscreen.h
@@ -59,9 +59,9 @@ public:
QRect geometry() const Q_DECL_OVERRIDE;
int depth() const Q_DECL_OVERRIDE;
QImage::Format format() const Q_DECL_OVERRIDE;
-
+#ifndef QT_NO_OPENGL
QPlatformOpenGLContext *platformContext() const;
-
+#endif
EGLSurface surface() const { return m_surface; }
private: