summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qplatformbackingstore.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qplatformbackingstore.h')
-rw-r--r--src/gui/painting/qplatformbackingstore.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gui/painting/qplatformbackingstore.h b/src/gui/painting/qplatformbackingstore.h
index df98ebf51b..eac97e9cf6 100644
--- a/src/gui/painting/qplatformbackingstore.h
+++ b/src/gui/painting/qplatformbackingstore.h
@@ -82,12 +82,14 @@ public:
bool isEmpty() const { return count() == 0; }
GLuint textureId(int index) const;
QRect geometry(int index) const;
- QWidget *widget(int index);
+ QRect clipRect(int index) const;
+ void *source(int index);
Flags flags(int index) const;
void lock(bool on);
bool isLocked() const;
- void appendTexture(QWidget *widget, GLuint textureId, const QRect &geometry, Flags flags = 0);
+ void appendTexture(void *source, GLuint textureId, const QRect &geometry,
+ const QRect &clipRect = QRect(), Flags flags = 0);
void clear();
Q_SIGNALS:
@@ -114,7 +116,12 @@ public:
QPlatformTextureList *textures, QOpenGLContext *context,
bool translucentBackground);
virtual QImage toImage() const;
- virtual GLuint toTexture(const QRegion &dirtyRegion, QSize *textureSize, bool *needsSwizzle) const;
+ enum TextureFlag {
+ TextureSwizzle = 0x01,
+ TextureFlip = 0x02
+ };
+ Q_DECLARE_FLAGS(TextureFlags, TextureFlag)
+ virtual GLuint toTexture(const QRegion &dirtyRegion, QSize *textureSize, TextureFlags *flags) const;
#endif
virtual QPlatformGraphicsBuffer *graphicsBuffer() const;
@@ -130,6 +137,10 @@ private:
QPlatformBackingStorePrivate *d_ptr;
};
+#ifndef QT_NO_OPENGL
+Q_DECLARE_OPERATORS_FOR_FLAGS(QPlatformBackingStore::TextureFlags)
+#endif
+
QT_END_NAMESPACE
#endif // QPLATFORMBACKINGSTORE_H