aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-18 01:00:17 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-04-18 08:01:45 +0200
commit934f25028a232c9bccdb842f53fa67959cc8dffc (patch)
treea78fef6197d63feab3194eb7f4cd2e10934b18ee /src/quick
parentf8e90c61c5da4ca5e0aec24d42b2962877289ab2 (diff)
parent2bdbf216fe7b6cf9d404b80ac405bd3969f5c07f (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: src/qml/qml/qqmlimport.cpp Change-Id: I6add6267297ea50a646d43d212027a168dca8916
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/doc/qtquick.qdocconf1
-rw-r--r--src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc12
-rw-r--r--src/quick/items/qquickwindow.cpp12
-rw-r--r--src/quick/items/qquickwindow.h1
4 files changed, 20 insertions, 6 deletions
diff --git a/src/quick/doc/qtquick.qdocconf b/src/quick/doc/qtquick.qdocconf
index b1268097fc..6620650d4a 100644
--- a/src/quick/doc/qtquick.qdocconf
+++ b/src/quick/doc/qtquick.qdocconf
@@ -43,7 +43,6 @@ headerdirs += ..\
../../quickwidgets
sourcedirs += .. \
- ../../imports/testlib \
../../quickwidgets
exampledirs += ../../../examples/quick \
diff --git a/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc b/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
index 4c94259139..9383c78a42 100644
--- a/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
+++ b/src/quick/doc/src/concepts/visualcanvas/scenegraph.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -269,7 +269,7 @@ animations, process events, etc.
\endlist
The threaded renderer is currently used by default on Windows with
-opengl32.dll, Linux with non-Mesa based drivers, \macos, mobile
+opengl32.dll, Linux with non-Mesa based drivers, mobile
platforms, and Embedded Linux with EGLFS but this is subject to
change. It is possible to force use of the threaded renderer by
setting \c {QSG_RENDER_LOOP=threaded} in the environment.
@@ -277,13 +277,19 @@ setting \c {QSG_RENDER_LOOP=threaded} in the environment.
\section2 Non-threaded Render Loops ("basic" and "windows")
The non-threaded render loop is currently used by default on Windows
-with ANGLE or a non-default opengl32 implementation and Linux with
+with ANGLE or a non-default opengl32 implementation, \macos, and Linux with
Mesa drivers. For the latter this is mostly a precautionary measure,
as not all combinations of OpenGL drivers and windowing systems have
been tested. At the same time implementations like ANGLE or Mesa
llvmpipe are not able to function properly with threaded rendering at
all so not using threaded rendering is essential for these.
+On macOS, the threaded render loop is not supported when building
+with XCode 10 (10.14 SDK) or later, since this opts in to layer-backed
+views on macOS 10.14. You can build with Xcode 9 (10.13 SDK) to opt
+out of layer-backing, in which case the threaded render loop is
+available and used by default.
+
By default \c windows is used for non-threaded rendering on Windows
with ANGLE, while \c basic is used for all other platforms when
non-threaded rendering is needed.
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 88d419e2b3..9d0f4a6893 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -4892,10 +4892,18 @@ void QQuickWindow::scheduleRenderJob(QRunnable *job, RenderStage stage)
} else if (stage == AfterSwapStage) {
d->afterSwapJobs << job;
} else if (stage == NoStage) {
- if (isExposed())
+ if (d->renderControl && openglContext()
+#if QT_CONFIG(opengl)
+ && openglContext()->thread() == QThread::currentThread()
+#endif
+ ) {
+ job->run();
+ delete job;
+ } else if (isExposed()) {
d->windowManager->postJob(this, job);
- else
+ } else {
delete job;
+ }
}
d->renderJobMutex.unlock();
}
diff --git a/src/quick/items/qquickwindow.h b/src/quick/items/qquickwindow.h
index 79e8a11aa8..53fe0a4c4b 100644
--- a/src/quick/items/qquickwindow.h
+++ b/src/quick/items/qquickwindow.h
@@ -241,6 +241,7 @@ private:
friend class QQuickWidget;
friend class QQuickRenderControl;
friend class QQuickAnimatorController;
+ friend class QQuickWidgetPrivate;
Q_DISABLE_COPY(QQuickWindow)
};