summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopengltexturecache_p.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-10-24 19:50:34 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-25 14:51:30 +0200
commite1325cf26e146b68725cc1a0a02b274ce3dfbe5c (patch)
treedba5e4afa3d2079712bdbc2b63f38475f2a4d2ea /src/gui/opengl/qopengltexturecache_p.h
parent788b8aa29d9f7c13ba3755a0b3ffa2dc7833732d (diff)
Do not byteswap RGBA8888 formats
The three RGBA8888 formats was introduced to make it possible to have QImages and QPixmaps in native OpenGL formats, but uploaded textures of these types are still converted to ARGB first and then swapped back. This patch detects the formats and ensures the unneeded back-and-forth conversion does not take place. It also replaces a seemingly unused private API meant for the same goal. Change-Id: Id69d6973bb9c13d1052f2a1b0c516183f63421c2 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/gui/opengl/qopengltexturecache_p.h')
-rw-r--r--src/gui/opengl/qopengltexturecache_p.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/opengl/qopengltexturecache_p.h b/src/gui/opengl/qopengltexturecache_p.h
index d4d3f00069..2e82d5f373 100644
--- a/src/gui/opengl/qopengltexturecache_p.h
+++ b/src/gui/opengl/qopengltexturecache_p.h
@@ -78,7 +78,7 @@ class Q_GUI_EXPORT QOpenGLTextureCache : public QOpenGLSharedResource
public:
static QOpenGLTextureCache *cacheForContext(QOpenGLContext *context);
- QOpenGLTextureCache(QOpenGLContext *, bool useByteSwapImage = true);
+ QOpenGLTextureCache(QOpenGLContext *);
~QOpenGLTextureCache();
GLuint bindTexture(QOpenGLContext *context, const QPixmap &pixmap);
@@ -94,7 +94,6 @@ private:
QMutex m_mutex;
QCache<quint64, QOpenGLCachedTexture> m_cache;
- bool m_useByteSwapImage;
};
QT_END_NAMESPACE