Commented confusing QWriteLocker use in QGLTextureCache::getTexture().

Task-number: QTBUG-22560
Change-Id: Idd3948455e8415473a407f66b628418c0d87898d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
Samuel Rødal 2012-11-27 10:25:34 +01:00 committed by The Qt Project
parent 6133c8a9e7
commit 171938ce1a

View File

@ -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);