From c95542694527d66361b9882ad39db5eb06cca3fe Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 26 Jul 2019 13:16:57 +0200 Subject: 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 --- tests/manual/rhi/multiwindow_threaded/multiwindow_threaded.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/manual/rhi') 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); -- cgit v1.2.3