aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-09-06 07:30:06 +0200
committerLiang Qi <liang.qi@qt.io>2018-09-06 07:30:06 +0200
commit60a2c3e453177389c0dfbca9211fa2918755124d (patch)
tree0f329b8ae854fa1a17be31a4653bb4b76af46f86 /src/quick/scenegraph
parentbbc52bcbb6391c4925df26672eb1f26040c6f67c (diff)
parentfa74444ed06e4db21b0e9829a5832b886b39d372 (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts: tools/qmlscene/main.cpp Change-Id: Idd6e05582ade4def1a3907f9622a8e132bec6bf7
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r--src/quick/scenegraph/adaptations/adaptations.pri2
-rw-r--r--src/quick/scenegraph/qsgcontextplugin.cpp2
-rw-r--r--src/quick/scenegraph/qsgdefaultrendercontext.cpp3
-rw-r--r--src/quick/scenegraph/qsgrenderloop.cpp2
-rw-r--r--src/quick/scenegraph/scenegraph.pri9
-rw-r--r--src/quick/scenegraph/util/qsgtexturereader.cpp5
6 files changed, 18 insertions, 5 deletions
diff --git a/src/quick/scenegraph/adaptations/adaptations.pri b/src/quick/scenegraph/adaptations/adaptations.pri
index 40fa739e15..bfd7095718 100644
--- a/src/quick/scenegraph/adaptations/adaptations.pri
+++ b/src/quick/scenegraph/adaptations/adaptations.pri
@@ -1 +1 @@
-include(software/software.pri)
+qtConfig(thread): include(software/software.pri)
diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp
index 66add51c55..4f8b1cf332 100644
--- a/src/quick/scenegraph/qsgcontextplugin.cpp
+++ b/src/quick/scenegraph/qsgcontextplugin.cpp
@@ -89,8 +89,10 @@ 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()
diff --git a/src/quick/scenegraph/qsgdefaultrendercontext.cpp b/src/quick/scenegraph/qsgdefaultrendercontext.cpp
index 22e97a2dc9..73b79c6300 100644
--- a/src/quick/scenegraph/qsgdefaultrendercontext.cpp
+++ b/src/quick/scenegraph/qsgdefaultrendercontext.cpp
@@ -325,7 +325,8 @@ bool QSGDefaultRenderContext::separateIndexBuffer() const
// lifetime. An attempt to bind a buffer object to the other
// target will generate an INVALID_OPERATION error, and the
// current binding will remain untouched.
- static const bool isWebGL = qGuiApp->platformName().compare(QLatin1String("webgl")) == 0;
+ static const bool isWebGL = (qGuiApp->platformName().compare(QLatin1String("webgl")) == 0
+ || qGuiApp->platformName().compare(QLatin1String("wasm")) == 0);
return isWebGL;
}
diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp
index 2eaed497ef..79bfe95e90 100644
--- a/src/quick/scenegraph/qsgrenderloop.cpp
+++ b/src/quick/scenegraph/qsgrenderloop.cpp
@@ -221,10 +221,12 @@ QSGRenderLoop *QSGRenderLoop::instance()
}
switch (loopType) {
+#if QT_CONFIG(thread)
case ThreadedRenderLoop:
qCDebug(QSG_LOG_INFO, "threaded render loop");
s_instance = new QSGThreadedRenderLoop();
break;
+#endif
case WindowsRenderLoop:
qCDebug(QSG_LOG_INFO, "windows render loop");
s_instance = new QSGWindowsRenderLoop();
diff --git a/src/quick/scenegraph/scenegraph.pri b/src/quick/scenegraph/scenegraph.pri
index f08e8b7863..ddd7fb7f4c 100644
--- a/src/quick/scenegraph/scenegraph.pri
+++ b/src/quick/scenegraph/scenegraph.pri
@@ -115,7 +115,6 @@ qtConfig(opengl(es1|es2)?) {
$$PWD/util/qsgdefaultimagenode.cpp \
$$PWD/util/qsgdefaultninepatchnode.cpp \
$$PWD/qsgdefaultlayer.cpp \
- $$PWD/qsgthreadedrenderloop.cpp \
$$PWD/qsgwindowsrenderloop.cpp
HEADERS += \
$$PWD/qsgdefaultglyphnode_p.h \
@@ -132,9 +131,15 @@ qtConfig(opengl(es1|es2)?) {
$$PWD/util/qsgdefaultimagenode_p.h \
$$PWD/util/qsgdefaultninepatchnode_p.h \
$$PWD/qsgdefaultlayer_p.h \
- $$PWD/qsgthreadedrenderloop_p.h \
$$PWD/qsgwindowsrenderloop_p.h
+ qtConfig(thread) {
+ SOURCES += \
+ $$PWD/qsgthreadedrenderloop.cpp
+ HEADERS += \
+ $$PWD/qsgthreadedrenderloop_p.h
+ }
+
qtConfig(quick-sprite) {
SOURCES += \
$$PWD/qsgdefaultspritenode.cpp
diff --git a/src/quick/scenegraph/util/qsgtexturereader.cpp b/src/quick/scenegraph/util/qsgtexturereader.cpp
index 27ba119f63..5e12ca4035 100644
--- a/src/quick/scenegraph/util/qsgtexturereader.cpp
+++ b/src/quick/scenegraph/util/qsgtexturereader.cpp
@@ -38,9 +38,12 @@
****************************************************************************/
#include "qsgtexturereader_p.h"
-#include <private/qsgcompressedtexture_p.h>
#include <private/qtexturefilereader_p.h>
+#if QT_CONFIG(opengl)
+#include <private/qsgcompressedtexture_p.h>
+#endif
+
QT_BEGIN_NAMESPACE
QSGTextureReader::QSGTextureReader(QIODevice *device, const QString &fileName)