summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2017-07-12 12:55:24 +0200
committerJesus Fernandez <Jesus.Fernandez@qt.io>2018-02-13 12:10:45 +0000
commitd2180a878424a1a790ca8060071f1c2847aee45f (patch)
tree4c38e878c3e3d07e4f9caaf5ce947569fee05ccd
parent76e27b8f62afba31a2c675eba4445308eaf47df2 (diff)
Force Threaded Render Loop mode
It enforces use of the render loop's threaded mode. This enables the plugin to work on Windows and other environments whose render loop uses a different mode by default. Change-Id: I86901fa2c279126e4abb2d79efbb328778861113 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-rw-r--r--src/plugins/platforms/webgl/qwebglintegration.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/webgl/qwebglintegration.cpp b/src/plugins/platforms/webgl/qwebglintegration.cpp
index 4305253..1db869e 100644
--- a/src/plugins/platforms/webgl/qwebglintegration.cpp
+++ b/src/plugins/platforms/webgl/qwebglintegration.cpp
@@ -103,6 +103,11 @@ QWebGLIntegration *QWebGLIntegration::instance()
void QWebGLIntegration::initialize()
{
Q_D(QWebGLIntegration);
+
+#if defined(QT_QUICK_LIB)
+ qputenv("QSG_RENDER_LOOP", "threaded"); // Force threaded QSG_RENDER_LOOP
+#endif
+
d->inputContext = QPlatformInputContextFactory::create();
d->screen = new QWebGLScreen;
screenAdded(d->screen, true);