aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-09-07 10:58:02 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-09-10 09:42:08 +0000
commit92fcfdda3d0ebeb6a8151ce5f9f90fe0f86d4861 (patch)
treec6e485cccf67ee07ca10337e6964deb006542ad0 /src/quick/scenegraph
parent5ec0599032b78d628ab562d839ae4bf2414c7bf6 (diff)
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 <lorn.potter@gmail.com>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r--src/quick/scenegraph/adaptations/adaptations.pri2
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwareadaptation.cpp2
-rw-r--r--src/quick/scenegraph/adaptations/software/software.pri13
-rw-r--r--src/quick/scenegraph/qsgcontextplugin.cpp2
4 files changed, 12 insertions, 7 deletions
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()