aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2018-04-23 09:53:19 +0200
committerMorten Johan Sørvig <morten.sorvig@qt.io>2018-04-24 19:47:33 +0000
commitee4383c1bef1eb51ab52b0da9db098c4b8c9c7ba (patch)
tree697fb6c1a05b91e553f04a385b55c474afac7625 /src/quick
parent176b62f327198166c4dc691606d562724ea438b6 (diff)
wasm: make no-tread platform independent
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 <lorn.potter@gmail.com>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/scenegraph/qsgrenderloop.cpp10
1 files changed, 6 insertions, 4 deletions
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");