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/eglfs/api/qeglfswindow_p.h | |
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/eglfs/api/qeglfswindow_p.h')
-rw-r--r-- | src/plugins/platforms/eglfs/api/qeglfswindow_p.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/plugins/platforms/eglfs/api/qeglfswindow_p.h b/src/plugins/platforms/eglfs/api/qeglfswindow_p.h index 0889f27ae3..d280197aae 100644 --- a/src/plugins/platforms/eglfs/api/qeglfswindow_p.h +++ b/src/plugins/platforms/eglfs/api/qeglfswindow_p.h @@ -56,14 +56,19 @@ #include "qeglfsscreen_p.h" #include <qpa/qplatformwindow.h> -#include <QtPlatformCompositorSupport/private/qopenglcompositor_p.h> +#ifndef QT_NO_OPENGL +# include <QtPlatformCompositorSupport/private/qopenglcompositor_p.h> +#endif QT_BEGIN_NAMESPACE class QOpenGLCompositorBackingStore; class QPlatformTextureList; - +#ifndef QT_NO_OPENGL class Q_EGLFS_EXPORT QEglFSWindow : public QPlatformWindow, public QOpenGLCompositorWindow +#else +class Q_EGLFS_EXPORT QEglFSWindow : public QPlatformWindow +#endif { public: QEglFSWindow(QWindow *w); @@ -97,16 +102,21 @@ public: virtual void invalidateSurface() Q_DECL_OVERRIDE; virtual void resetSurface(); +#ifndef QT_NO_OPENGL QOpenGLCompositorBackingStore *backingStore() { return m_backingStore; } void setBackingStore(QOpenGLCompositorBackingStore *backingStore) { m_backingStore = backingStore; } +#endif bool isRaster() const; - +#ifndef QT_NO_OPENGL QWindow *sourceWindow() const Q_DECL_OVERRIDE; const QPlatformTextureList *textures() const Q_DECL_OVERRIDE; void endCompositing() Q_DECL_OVERRIDE; +#endif protected: +#ifndef QT_NO_OPENGL QOpenGLCompositorBackingStore *m_backingStore; +#endif bool m_raster; WId m_winId; |