diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-07-26 13:16:57 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-07-31 09:04:41 +0200 |
commit | c95542694527d66361b9882ad39db5eb06cca3fe (patch) | |
tree | 6f6bda5a333cf307633ec132197fb078adcced47 /tests/manual | |
parent | a093e4e3c2058b4662ff27473bcfba3c141f0924 (diff) |
rhi: metal: Do not hold on to the drawable when not presenting
The Quick render loops do SkipPresent occasionally, and it all seemed
to work with the threaded one because we lack an autorelease pool on
the SG render thread. (to be corrected separately) The basic one ended
up crashing sometimes, however. Holding on to the drawable is incorrect.
Fixes: QTBUG-76953
Change-Id: I0d0ec6d09aa209d2c848d7a9dbd9b15916fe23ab
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/rhi/multiwindow_threaded/multiwindow_threaded.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/manual/rhi/multiwindow_threaded/multiwindow_threaded.cpp b/tests/manual/rhi/multiwindow_threaded/multiwindow_threaded.cpp index 8fda2b73c8..53185bddb2 100644 --- a/tests/manual/rhi/multiwindow_threaded/multiwindow_threaded.cpp +++ b/tests/manual/rhi/multiwindow_threaded/multiwindow_threaded.cpp @@ -290,6 +290,10 @@ struct Renderer void Thread::run() { while (active) { +#ifdef Q_OS_DARWIN + QMacAutoReleasePool autoReleasePool; +#endif + if (pendingRender) { pendingRender = false; renderer->render(pendingRenderIsNewExpose, false); |