summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/qeglfswindow.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-06-29 11:56:03 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-07-16 13:20:09 +0000
commit9d0a10dc84915508adf60e98ce01a4cc0cf02f70 (patch)
treebd57ac98463f9629fcfe0f27e51fdf0c9d2b9d10 /src/plugins/platforms/eglfs/qeglfswindow.h
parent8f814e8cba3b52bdf3fff933e9dc5db5c97b30e8 (diff)
Move eglfs-only parts back from eglconvenience
The integration, screen, window and cursor classes were split in Qt 5.3 under a plan of sharing these between eglfs, the Android port and potentially other future plugins. This never materialized. Maintaining the artificial split is getting difficult and is prone to errors. Therefore it is time to merge back these base classes into eglfs. The result is cleaner, smaller, and potentially better performing code. eglconvenience is now restored to be a collection of convenience classes instead of platform plugin bits. Change-Id: I75c6ad876ef66a1a0c5b39c1c307f928d2ed47d4 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfswindow.h')
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.h33
1 files changed, 26 insertions, 7 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfswindow.h b/src/plugins/platforms/eglfs/qeglfswindow.h
index f9d207c153..53b9e18dc1 100644
--- a/src/plugins/platforms/eglfs/qeglfswindow.h
+++ b/src/plugins/platforms/eglfs/qeglfswindow.h
@@ -37,17 +37,23 @@
#include "qeglfsintegration.h"
#include "qeglfsscreen.h"
#include "qeglfsglobal.h"
-#include <QtPlatformSupport/private/qeglplatformwindow_p.h>
+
+#include <qpa/qplatformwindow.h>
+#include <QtPlatformSupport/private/qopenglcompositor_p.h>
+#include <EGL/egl.h>
QT_BEGIN_NAMESPACE
-class Q_EGLFS_EXPORT QEglFSWindow : public QEGLPlatformWindow
+class QOpenGLCompositorBackingStore;
+class QPlatformTextureList;
+
+class Q_EGLFS_EXPORT QEglFSWindow : public QPlatformWindow, public QOpenGLCompositorWindow
{
public:
QEglFSWindow(QWindow *w);
~QEglFSWindow();
- void create() Q_DECL_OVERRIDE;
+ void create();
void destroy();
void setGeometry(const QRect &) Q_DECL_OVERRIDE;
@@ -58,13 +64,15 @@ public:
void lower() Q_DECL_OVERRIDE;
void propagateSizeHints() Q_DECL_OVERRIDE { }
- void setOpacity(qreal) Q_DECL_OVERRIDE { }
void setMask(const QRegion &) Q_DECL_OVERRIDE { }
bool setKeyboardGrabEnabled(bool) Q_DECL_OVERRIDE { return false; }
bool setMouseGrabEnabled(bool) Q_DECL_OVERRIDE { return false; }
+ void setOpacity(qreal) Q_DECL_OVERRIDE;
+ WId winId() const Q_DECL_OVERRIDE;
QSurfaceFormat format() const Q_DECL_OVERRIDE;
- EGLNativeWindowType eglWindow() const Q_DECL_OVERRIDE;
+
+ EGLNativeWindowType eglWindow() const;
EGLSurface surface() const;
QEglFSScreen *screen() const;
@@ -73,11 +81,22 @@ public:
virtual void invalidateSurface() Q_DECL_OVERRIDE;
virtual void resetSurface();
-protected:
+ QOpenGLCompositorBackingStore *backingStore() { return m_backingStore; }
+ void setBackingStore(QOpenGLCompositorBackingStore *backingStore) { m_backingStore = backingStore; }
+ bool isRaster() const;
+
+ QWindow *sourceWindow() const Q_DECL_OVERRIDE;
+ const QPlatformTextureList *textures() const Q_DECL_OVERRIDE;
+ void endCompositing() Q_DECL_OVERRIDE;
+
+private:
+ QOpenGLCompositorBackingStore *m_backingStore;
+ bool m_raster;
+ WId m_winId;
+
EGLSurface m_surface;
EGLNativeWindowType m_window;
-private:
EGLConfig m_config;
QSurfaceFormat m_format;