summaryrefslogtreecommitdiff
path: root/src/render/backend/renderer_p.h
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2014-10-12 20:40:15 +0100
committerSean Harmer <sean.harmer@kdab.com>2014-10-12 23:07:14 +0200
commitee28e3e7ea0071aa9934432e713de55fecf75315 (patch)
treea10abd559c685faa580a4ab98ca254d9e78e2d5f /src/render/backend/renderer_p.h
parente8b8fff1c26737dbc55ea1b37385027d21d69498 (diff)
downloadqt3d-ee28e3e7ea0071aa9934432e713de55fecf75315.tar.gz
Create and destroy the renderer's TLS frame allocators like arbiter
This removes the remaining warnings about threads being deleted after the TLS of frame allocators. The remaining shutdown bug is caused by nodes trying to send notifications the the change arbiter that has already been destroyed. I will address this next. Change-Id: I94539aada90797430f571216134dd18f0b5666f9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/backend/renderer_p.h')
-rw-r--r--src/render/backend/renderer_p.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/render/backend/renderer_p.h b/src/render/backend/renderer_p.h
index ad5f5f93d..2c8e53994 100644
--- a/src/render/backend/renderer_p.h
+++ b/src/render/backend/renderer_p.h
@@ -138,6 +138,11 @@ public:
void setRendererAspect(RendererAspect *aspect) { m_rendererAspect = aspect; }
RendererAspect *rendererAspect() const { return m_rendererAspect; }
+ void createAllocators();
+ void destroyAllocators();
+
+ QThreadStorage<QPair<int, QFrameAllocatorQueue *> *> *tlsAllocators();
+
void setFrameGraphRoot(Render::FrameGraphNode *fgRoot);
Render::FrameGraphNode *frameGraphRoot() const;
@@ -276,7 +281,9 @@ private:
uint m_frameCount;
int m_currentPreprocessingFrameIndex;
- QThreadStorage< QPair<int, QFrameAllocatorQueue *> > m_tlsAllocators;
+ static void createThreadLocalAllocator(void *renderer);
+ static void destroyThreadLocalAllocator(void *renderer);
+ QThreadStorage< QPair<int, QFrameAllocatorQueue *> *> m_tlsAllocators;
const int m_cachedFramesCount;
QAtomicInt m_running;