diff options
author | Andy Nichols <andy.nichols@qt.io> | 2016-11-08 16:02:01 +0100 |
---|---|---|
committer | Andy Nichols <andy.nichols@qt.io> | 2016-11-17 14:59:47 +0000 |
commit | 1b905b3fa4955e26b39aaa51b0ca47e9c05e680b (patch) | |
tree | d17513037673b80299555034b9550a3c01b2eb8e /src/plugins/platforms/minimalegl/qminimaleglintegration.cpp | |
parent | e3ed95dd44b95b6e9361b562807e711d7ce5a58b (diff) |
Enable building EGLFS and MinimalEGL with QT_NO_OPENGL
It is possible to have support for EGL without having support for OpenGL
for example with OpenVG. Unfortanately many features of EGLFS require
OpenGL (Cursor, MultiWindow, QEGLPlatformContext, QBackingStore), so the
plugins become pretty useless on their own. This is necessary if you
still want to use Qt as a method to provide an EGL surface to render to
via QWindow. This is the method by which Qt Quick uses OpenVG to render
its content when available.
Change-Id: I34973b21bf1932865950ce6a78b71b3a29360d65
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/platforms/minimalegl/qminimaleglintegration.cpp')
-rw-r--r-- | src/plugins/platforms/minimalegl/qminimaleglintegration.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
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 { |