From ee4383c1bef1eb51ab52b0da9db098c4b8c9c7ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 23 Apr 2018 09:53:19 +0200 Subject: wasm: make no-tread platform independent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use QT_NO_THREAD instead of Q_OS_HTML. This way we can test the no-thread config also on host builds. Move the render loop loopType override to after applying platform and environment settings, so that we don’t enable the threaded render loop by accident. Allow the windows render loop (whether or not this works is untested). Change-Id: I4ea76f386a3914de208a380663c665f962cd2069 Reviewed-by: Lorn Potter --- src/quick/scenegraph/qsgrenderloop.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/quick/scenegraph') diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp index a55b7b4ad9..88b9c93448 100644 --- a/src/quick/scenegraph/qsgrenderloop.cpp +++ b/src/quick/scenegraph/qsgrenderloop.cpp @@ -201,12 +201,9 @@ QSGRenderLoop *QSGRenderLoop::instance() loopType = ThreadedRenderLoop; else loopType = WindowsRenderLoop; -#elif defined(Q_OS_HTML5) - loopType = BasicRenderLoop; -#else +#endif if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL)) loopType = ThreadedRenderLoop; -#endif if (qmlNoThreadedRenderer()) loopType = BasicRenderLoop; @@ -223,6 +220,11 @@ QSGRenderLoop *QSGRenderLoop::instance() loopType = ThreadedRenderLoop; } +#ifdef QT_NO_THREAD + if (loopType == ThreadedRenderLoop) + loopType = BasicRenderLoop; +#endif + switch (loopType) { case ThreadedRenderLoop: qCDebug(QSG_LOG_INFO, "threaded render loop"); -- cgit v1.2.3