summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/qeglfsbackingstore.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2013-10-08 14:55:28 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-09 13:52:58 +0200
commit80cd06fd9d26aa7df02f71e001b449d65bb5b7a3 (patch)
tree240ef609bab7f481e7b86cd6ad625b457de38c28 /src/plugins/platforms/eglfs/qeglfsbackingstore.h
parent8d2c6206fdf564aa75680f4fea58e31d26a3d6dd (diff)
eglfs: Separate compositor and improve raster window support
Separating the compositor into a separate source file improves the chances of possible future reuse and paves the way to supporting multiple GL windows. Tooltips are now working too. Implemented a few window functions like raise() and lower(). Fixed the qFatal for multiple GL windows to be raised in non-SDK based Android builds too. Change-Id: Id94d2fb2a4382766f3d130eebe1e6f397a535852 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfsbackingstore.h')
-rw-r--r--src/plugins/platforms/eglfs/qeglfsbackingstore.h35
1 files changed, 2 insertions, 33 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsbackingstore.h b/src/plugins/platforms/eglfs/qeglfsbackingstore.h
index 39bdab1563..535428aac1 100644
--- a/src/plugins/platforms/eglfs/qeglfsbackingstore.h
+++ b/src/plugins/platforms/eglfs/qeglfsbackingstore.h
@@ -46,41 +46,16 @@
#include <QImage>
#include <QRegion>
-#include <QTimer>
QT_BEGIN_NAMESPACE
-class QOpenGLContext;
class QOpenGLPaintDevice;
-class QOpenGLShaderProgram;
class QEglFSWindow;
-class QEglFSCompositor : public QObject
-{
- Q_OBJECT
-
-public:
- QEglFSCompositor();
-
- void schedule(QEglFSWindow *rootWindow);
-
- static QEglFSCompositor *instance();
-
-private slots:
- void renderAll();
-
-private:
- void render(QEglFSWindow *window, QEglFSWindow *rootWindow);
-
- QEglFSWindow *m_rootWindow;
- QTimer m_updateTimer;
-};
-
class QEglFSBackingStore : public QPlatformBackingStore
{
public:
QEglFSBackingStore(QWindow *window);
- ~QEglFSBackingStore();
QPaintDevice *paintDevice();
@@ -89,21 +64,15 @@ public:
void flush(QWindow *window, const QRegion &region, const QPoint &offset);
void resize(const QSize &size, const QRegion &staticContents);
+ uint texture() const { return m_texture; }
+
private:
- void makeCurrent();
- static QOpenGLContext *makeRootCurrent(QEglFSWindow *rootWin);
void updateTexture();
QEglFSWindow *m_window;
- QOpenGLContext *m_context;
QImage m_image;
uint m_texture;
QRegion m_dirty;
- QOpenGLShaderProgram *m_program;
- int m_vertexCoordEntry;
- int m_textureCoordEntry;
-
- friend class QEglFSCompositor;
};
QT_END_NAMESPACE