From 39e3977cc532bcab90410bb85b7bda664dd6bfd3 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 21 Apr 2015 11:05:07 +0200 Subject: Add flip support to QPlatformBackingStore::toTexture() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Necessary for iOS. In addition to swizzle we also need to communicate the need for flipping, so switch to flags instead of bools. Task-number: QTBUG-40034 Change-Id: I055e591afd838878503be6f5f69aa7347965d9cf Reviewed-by: Tor Arne Vestbø --- src/gui/painting/qplatformbackingstore.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/gui/painting/qplatformbackingstore.h') diff --git a/src/gui/painting/qplatformbackingstore.h b/src/gui/painting/qplatformbackingstore.h index df98ebf51b..ae7314b6d0 100644 --- a/src/gui/painting/qplatformbackingstore.h +++ b/src/gui/painting/qplatformbackingstore.h @@ -114,7 +114,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 +135,10 @@ private: QPlatformBackingStorePrivate *d_ptr; }; +#ifndef QT_NO_OPENGL +Q_DECLARE_OPERATORS_FOR_FLAGS(QPlatformBackingStore::TextureFlags) +#endif + QT_END_NAMESPACE #endif // QPLATFORMBACKINGSTORE_H -- cgit v1.2.3