diff options
author | Paul Olav Tvete <paul.tvete@digia.com> | 2013-12-18 14:48:22 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-12 20:12:17 +0100 |
commit | eacd58d4e78e7238ba5fcca90ba960aaf3ebd263 (patch) | |
tree | 779bf1735aecb7985bc3136264b9147eb23d5374 /src/gui/painting/qplatformbackingstore.h | |
parent | 5ae5bebb93ec38e17c0dcb9bec47e0ebfbce4937 (diff) |
Enabling QQuickWidget and QOpenGLWidget
Enable child widgets (without a native window) that render to an FBO
and are composed with the raster backingstore by the platform plugin.
A preliminary version of QOpenGLWidget is included as private API.
Change-Id: I8f984a4d7db285069ce3d6564707942c823d890d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/gui/painting/qplatformbackingstore.h')
-rw-r--r-- | src/gui/painting/qplatformbackingstore.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/gui/painting/qplatformbackingstore.h b/src/gui/painting/qplatformbackingstore.h index 1b19b2c379..a662a2290b 100644 --- a/src/gui/painting/qplatformbackingstore.h +++ b/src/gui/painting/qplatformbackingstore.h @@ -52,9 +52,11 @@ // #include <QtCore/qrect.h> +#include <QtCore/qobject.h> #include <QtGui/qwindow.h> #include <QtGui/qregion.h> +#include <QtGui/qopengl.h> QT_BEGIN_NAMESPACE @@ -65,6 +67,31 @@ class QPoint; class QImage; class QPlatformBackingStorePrivate; class QPlatformWindow; +class QPlatformTextureList; +class QPlatformTextureListPrivate; +class QOpenGLContext; + +#ifndef QT_NO_OPENGL +class Q_GUI_EXPORT QPlatformTextureList : public QObject +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QPlatformTextureList) +public: + explicit QPlatformTextureList(QObject *parent = 0); + ~QPlatformTextureList(); + + int count() const; + GLuint textureId(int index) const; + QRect geometry(int index) const; + void lock(bool on); + bool isLocked() const; + + void appendTexture(GLuint textureId, const QRect &geometry); + + Q_SIGNALS: + void locked(bool); +}; +#endif class Q_GUI_EXPORT QPlatformBackingStore { @@ -79,6 +106,11 @@ public: // 'window' can be a child window, in which case 'region' is in child window coordinates and // offset is the (child) window's offset in relation to the window surface. virtual void flush(QWindow *window, const QRegion ®ion, const QPoint &offset) = 0; +#ifndef QT_NO_OPENGL + virtual void composeAndFlush(QWindow *window, const QRegion ®ion, const QPoint &offset, QPlatformTextureList *textures, QOpenGLContext *context); + virtual QImage toImage() const; + virtual GLuint toTexture(const QRegion &dirtyRegion) const; +#endif virtual void resize(const QSize &size, const QRegion &staticContents) = 0; |