projects
/
profile
/
ivi
/
qtbase.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6133c8a
)
Commented confusing QWriteLocker use in QGLTextureCache::getTexture().
author
Samuel Rødal
<samuel.rodal@digia.com>
Tue, 27 Nov 2012 09:25:34 +0000
(10:25 +0100)
committer
The Qt Project
<gerrit-noreply@qt-project.org>
Tue, 27 Nov 2012 18:31:21 +0000
(19:31 +0100)
Task-number: QTBUG-22560
Change-Id: Idd3948455e8415473a407f66b628418c0d87898d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
src/opengl/qgl_p.h
patch
|
blob
|
history
diff --git
a/src/opengl/qgl_p.h
b/src/opengl/qgl_p.h
index
7154545
..
df099ea
100644
(file)
--- 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);