Avoid double QCache lookup in QOpenGLProgramBinaryCache
Change-Id: I4384a15f0b89e1f6d7f59bff1816fc2e6fc6adfe Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
e688e28ee5
commit
c47f436175
@ -264,10 +264,8 @@ public:
|
||||
bool QOpenGLProgramBinaryCache::load(const QByteArray &cacheKey, uint programId)
|
||||
{
|
||||
QMutexLocker lock(&m_mutex);
|
||||
if (m_memCache.contains(cacheKey)) {
|
||||
const MemCacheEntry *e = m_memCache[cacheKey];
|
||||
if (const MemCacheEntry *e = m_memCache.object(cacheKey))
|
||||
return setProgramBinary(programId, e->format, e->blob.constData(), e->blob.size());
|
||||
}
|
||||
|
||||
QByteArray buf;
|
||||
const QString fn = cacheFileName(cacheKey);
|
||||
|
Loading…
Reference in New Issue
Block a user