summaryrefslogtreecommitdiffstats
path: root/tests/auto/render/commons
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2016-05-16 11:58:14 +0100
committerSean Harmer <sean.harmer@kdab.com>2016-05-18 15:56:58 +0000
commit662be35bc6e288a25756eb2ee87349f099e7a8a7 (patch)
tree9b0864463570efac7440cca705d695d832e31bf2 /tests/auto/render/commons
parentbae68996a6ba55643874ea1e2c1e0bd71ef889c7 (diff)
Handle renderer shutdown request and assert in render aspect dtor
If the render aspect is deleted without having been unregistered by the aspect engine, something has gone wrong. Assert on this in the dtor. Renderer::shutdown() just requests the render thread to exit. When using a threaded renderer we also have to wake up the render thread by releasing the renderview semaphore which it may be waiting to acquire in Renderer::isReadyToSubmit(). As shutdown() only requests renderer shutdown, we introduce a function specifically for performing OpenGL (or other graphics API) resource freeing. This is called when exiting the render thread in the case of threaded rendering, and directly in the case of synchronous rendering. Task-number: QTBUG-50044 Task-number: QTBUG-51035 Change-Id: Ie3a5b2aa9f64c7aeebecedd6a56c29816532f126 Reviewed-by: Janne Koskinen <janne.p.koskinen@theqtcompany.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests/auto/render/commons')
-rw-r--r--tests/auto/render/commons/testrenderer.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/render/commons/testrenderer.h b/tests/auto/render/commons/testrenderer.h
index dc2e03ef7..6eac734df 100644
--- a/tests/auto/render/commons/testrenderer.h
+++ b/tests/auto/render/commons/testrenderer.h
@@ -50,6 +50,7 @@ public:
Qt3DCore::QServiceLocator *services() const Q_DECL_OVERRIDE { return nullptr; }
void initialize() Q_DECL_OVERRIDE {}
void shutdown() Q_DECL_OVERRIDE {}
+ void releaseGraphicsResources() Q_DECL_OVERRIDE {}
void createAllocators(Qt3DCore::QAbstractAspectJobManager *jobManager) Q_DECL_OVERRIDE { Q_UNUSED(jobManager); }
void destroyAllocators(Qt3DCore::QAbstractAspectJobManager *jobManager) Q_DECL_OVERRIDE { Q_UNUSED(jobManager); }
void render() Q_DECL_OVERRIDE {}