From 363830db7b14e53ce3c976c142da8edf1b648c69 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Mon, 8 Sep 2014 17:22:47 +0200 Subject: Check for Threaded Pixmaps capability for threaded renderer By default we used the threaded renderer, but this will only work if the platform has the capability to render to QPixmaps from multiple threads. Now if we don't have the Threaded Pixmaps capability we use the non-threaded render loop. Change-Id: I5090e874d0bbdd1e54561ea3583a5a17bbf50061 Reviewed-by: Simon Hausmann --- src/plugins/scenegraph/softwarecontext/pluginmain.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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 +#include + 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(); } -- cgit v1.2.3