Skip to content

Commit

Permalink
Avoid double QCache lookup in QOpenGLProgramBinaryCache
Browse files Browse the repository at this point in the history
Change-Id: I4384a15f0b89e1f6d7f59bff1816fc2e6fc6adfe
Reviewed-by: Marc Mutz <[email protected]>
  • Loading branch information
alpqr authored and marc-kdab committed Aug 22, 2019
1 parent e688e28 commit c47f436
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/gui/opengl/qopenglprogrambinarycache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,8 @@ class DeferredFileRemove
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);
Expand Down

0 comments on commit c47f436

Please sign in to comment.