From 1b905b3fa4955e26b39aaa51b0ca47e9c05e680b Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Tue, 8 Nov 2016 16:02:01 +0100 Subject: 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 --- src/plugins/platforms/eglfs/api/qeglfswindow_p.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/plugins/platforms/eglfs/api/qeglfswindow_p.h') 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 -#include +#ifndef QT_NO_OPENGL +# include +#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; -- cgit v1.2.3