summaryrefslogtreecommitdiffstats
path: root/src/plugins/renderers/opengl/renderer/renderviewbuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/renderers/opengl/renderer/renderviewbuilder.cpp')
-rw-r--r--src/plugins/renderers/opengl/renderer/renderviewbuilder.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/renderers/opengl/renderer/renderviewbuilder.cpp b/src/plugins/renderers/opengl/renderer/renderviewbuilder.cpp
index e971c3f3c..7dad70483 100644
--- a/src/plugins/renderers/opengl/renderer/renderviewbuilder.cpp
+++ b/src/plugins/renderers/opengl/renderer/renderviewbuilder.cpp
@@ -79,6 +79,7 @@ public:
// Rebuild RenderCommands for all entities in RV (ignoring filtering)
RendererCache *cache = m_renderer->cache();
+ QMutexLocker lock(cache->mutex());
Q_ASSERT(cache->leafNodeCache.contains(m_leafNode));
// The cache leaf should already have been created so we don't need to protect the access
@@ -284,6 +285,7 @@ public:
///////// CACHE LOCKED ////////////
// Retrieve Data from Cache
RendererCache *cache = m_renderer->cache();
+ QMutexLocker lock(cache->mutex());
Q_ASSERT(cache->leafNodeCache.contains(m_leafNode));
// We don't need to protect the cache access as
@@ -506,6 +508,7 @@ public:
void operator()()
{
+ QMutexLocker lock(m_renderer->cache()->mutex());
Q_ASSERT(m_renderer->cache()->leafNodeCache.contains(m_leafNode));
// The cache leaf should already have been created so we don't need to protect the access
RendererCache::LeafNodeData &dataCacheForLeaf = m_renderer->cache()->leafNodeCache[m_leafNode];
@@ -535,7 +538,7 @@ public:
{
// The cache leaf was created by SyncRenderViewPostInitialization on which we depend
// so we don't need to protect the access
-
+ QMutexLocker lock(m_renderer->cache()->mutex());
RendererCache::LeafNodeData &dataCacheForLeaf = m_renderer->cache()->leafNodeCache[m_leafNode];
dataCacheForLeaf.materialParameterGatherer.clear();