summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@digia.com>2012-11-27 10:25:34 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-27 19:31:21 +0100
commit171938ce1aa9ddcf948f99948881987d1c41620f (patch)
tree6b6a293aed3fc9baa71090ba7b9270d0895fcd9d /src/opengl
parent6133c8a9e7ab5e1eed2fa7d0ee2a61ace4bea65e (diff)
Commented confusing QWriteLocker use in QGLTextureCache::getTexture().
Task-number: QTBUG-22560 Change-Id: Idd3948455e8415473a407f66b628418c0d87898d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qgl_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 7154545eb5..df099ea281 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -504,6 +504,7 @@ int QGLTextureCache::maxCost()
QGLTexture* QGLTextureCache::getTexture(QGLContext *ctx, qint64 key)
{
+ // Can't be a QReadLocker since QCache::object() modifies the cache (reprioritizes the object)
QWriteLocker locker(&m_lock);
const QGLTextureCacheKey cacheKey = {key, QGLContextPrivate::contextGroup(ctx)};
return m_cache.object(cacheKey);