From 92fcfdda3d0ebeb6a8151ce5f9f90fe0f86d4861 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 7 Sep 2018 10:58:02 +0200 Subject: Re-enable the software rendered when Qt is built without threads This partially reverts commit a7472867f407f1226d82aa7bce4cd4d6f9bd652f and merely excludes the threaded render loop of the software renderer. Task-number: QTBUG-70422 Change-Id: Id56a3fc12a3601cb3bce8be35e201d772988ae23 Reviewed-by: Lorn Potter --- src/quick/scenegraph/adaptations/adaptations.pri | 2 +- .../adaptations/software/qsgsoftwareadaptation.cpp | 2 ++ src/quick/scenegraph/adaptations/software/software.pri | 13 +++++++++---- src/quick/scenegraph/qsgcontextplugin.cpp | 2 -- 4 files changed, 12 insertions(+), 7 deletions(-) (limited to 'src/quick/scenegraph') diff --git a/src/quick/scenegraph/adaptations/adaptations.pri b/src/quick/scenegraph/adaptations/adaptations.pri index bfd7095718..40fa739e15 100644 --- a/src/quick/scenegraph/adaptations/adaptations.pri +++ b/src/quick/scenegraph/adaptations/adaptations.pri @@ -1 +1 @@ -qtConfig(thread): include(software/software.pri) +include(software/software.pri) diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwareadaptation.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwareadaptation.cpp index a8b5944974..c33144344f 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwareadaptation.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwareadaptation.cpp @@ -74,6 +74,7 @@ QSGContextFactoryInterface::Flags QSGSoftwareAdaptation::flags(const QString &) QSGRenderLoop *QSGSoftwareAdaptation::createWindowManager() { +#if QT_CONFIG(thread) static bool threaded = false; static bool envChecked = false; if (!envChecked) { @@ -83,6 +84,7 @@ QSGRenderLoop *QSGSoftwareAdaptation::createWindowManager() if (threaded) return new QSGSoftwareThreadedRenderLoop; +#endif return new QSGSoftwareRenderLoop(); } diff --git a/src/quick/scenegraph/adaptations/software/software.pri b/src/quick/scenegraph/adaptations/software/software.pri index de5f01cdee..278dbe7944 100644 --- a/src/quick/scenegraph/adaptations/software/software.pri +++ b/src/quick/scenegraph/adaptations/software/software.pri @@ -18,8 +18,7 @@ SOURCES += \ $$PWD/qsgsoftwarerenderlistbuilder.cpp \ $$PWD/qsgsoftwarerenderloop.cpp \ $$PWD/qsgsoftwarelayer.cpp \ - $$PWD/qsgsoftwareadaptation.cpp \ - $$PWD/qsgsoftwarethreadedrenderloop.cpp + $$PWD/qsgsoftwareadaptation.cpp HEADERS += \ $$PWD/qsgsoftwarecontext_p.h \ @@ -37,8 +36,7 @@ HEADERS += \ $$PWD/qsgsoftwarerenderlistbuilder_p.h \ $$PWD/qsgsoftwarerenderloop_p.h \ $$PWD/qsgsoftwarelayer_p.h \ - $$PWD/qsgsoftwareadaptation_p.h \ - $$PWD/qsgsoftwarethreadedrenderloop_p.h + $$PWD/qsgsoftwareadaptation_p.h qtConfig(quick-sprite) { SOURCES += \ @@ -46,3 +44,10 @@ qtConfig(quick-sprite) { HEADERS += \ $$PWD/qsgsoftwarespritenode_p.h } + +qtConfig(thread) { + SOURCES += \ + $$PWD/qsgsoftwarethreadedrenderloop.cpp + HEADERS +=\ + $$PWD/qsgsoftwarethreadedrenderloop_p.h +} diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp index 4f8b1cf332..66add51c55 100644 --- a/src/quick/scenegraph/qsgcontextplugin.cpp +++ b/src/quick/scenegraph/qsgcontextplugin.cpp @@ -89,10 +89,8 @@ struct QSGAdaptationBackendData QSGAdaptationBackendData::QSGAdaptationBackendData() : flags(nullptr) { -#if QT_CONFIG(thread) // Fill in the table with the built-in adaptations. builtIns.append(new QSGSoftwareAdaptation); -#endif } QSGAdaptationBackendData::~QSGAdaptationBackendData() -- cgit v1.2.3