aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/scenegraph/softwarecontext
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/scenegraph/softwarecontext')
-rw-r--r--src/plugins/scenegraph/softwarecontext/pluginmain.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/scenegraph/softwarecontext/pluginmain.cpp b/src/plugins/scenegraph/softwarecontext/pluginmain.cpp
index afb91a8ea2..a928cb6e5e 100644
--- a/src/plugins/scenegraph/softwarecontext/pluginmain.cpp
+++ b/src/plugins/scenegraph/softwarecontext/pluginmain.cpp
@@ -24,6 +24,9 @@
#include "renderloop.h"
#include "threadedrenderloop.h"
+#include <private/qguiapplication_p.h>
+#include <qpa/qplatformintegration.h>
+
ContextPlugin::ContextPlugin(QObject *parent)
: QSGContextPlugin(parent)
{
@@ -43,8 +46,10 @@ QSGContext *ContextPlugin::create(const QString &) const
QSGRenderLoop *ContextPlugin::createWindowManager()
{
- if (qgetenv("QSG_RENDER_LOOP") == QByteArrayLiteral("basic"))
+ if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedPixmaps) ||
+ qgetenv("QSG_RENDER_LOOP") == QByteArrayLiteral("basic"))
return new RenderLoop();
+
return new ThreadedRenderLoop();
}