diff options
author | Tomi Korpipaa <tomi.korpipaa@qt.io> | 2018-12-05 12:03:48 +0200 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@qt.io> | 2018-12-05 12:05:00 +0000 |
commit | 36d0744de6d1a966af1d4d2b170fb53599894420 (patch) | |
tree | 5aa70366bd041e7ce6a299001c83fe92a4e55aeb | |
parent | d212a54fbebb0b188665390efdb724404a50be90 (diff) |
Fix subpresentation changing in Linux
Task-number: QT3DS-2824
Change-Id: Ie21b5fb8382ebb36fbf886534713d1fa1a6f4e6b
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r-- | src/Authoring/Studio/Render/StudioSubPresentationRenderer.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Authoring/Studio/Render/StudioSubPresentationRenderer.cpp b/src/Authoring/Studio/Render/StudioSubPresentationRenderer.cpp index 4afaf8eb..160343e0 100644 --- a/src/Authoring/Studio/Render/StudioSubPresentationRenderer.cpp +++ b/src/Authoring/Studio/Render/StudioSubPresentationRenderer.cpp @@ -46,7 +46,6 @@ public: , m_mainThread(mainThread) , m_semaphore(0) { - } QSize readPresentationSize(const QString &url) @@ -136,8 +135,8 @@ public: m_context->doneCurrent(); #ifndef Q_OS_LINUX - // TODO: Updating the subpresentation does not work on macOS and crashes on Linux, - // this hack fixes it for now + // TODO: Updating the subpresentation on loop crashes or hangs on Linux, this hack fixes + // it for now while (true) { QMutexLocker lock(&m_mutex); if (!m_running) @@ -158,17 +157,17 @@ public: QThread::usleep(33000); } m_fbo.reset(); + m_context->doneCurrent(); + m_context.reset(); +#endif #ifdef Q3DS_PREVIEW_SUBPRESENTATION_RT2 m_surfaceViewer->destroy(); #else m_surfaceViewer->shutdown(); #endif m_surfaceViewer.reset(); - m_context->doneCurrent(); - m_context.reset(); m_surface->moveToThread(m_mainThread); m_semaphore.release(); -#endif } void frameRendered() |