aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@pelagicore.com>2017-03-02 15:25:07 +0100
committerDominik Holland <dominik.holland@pelagicore.com>2017-06-16 06:59:04 +0000
commiteeb320bbd8763f3e72f79369cc3908e999a0da3c (patch)
treec0dedd87c84fc5f6e943d5efc121c20ec4ee27c2 /src/plugins
parentd2bb2e202427ebae545a408f065c893f3d837061 (diff)
Delay the deletion of QSGTextures until all windows are synchronized
With the 'basic' and the 'windows' render loop the scene graph context is shared. Because of this we cannot start deleting textures after the first window is synchronized as it may contain textures needed by the another window, which is not yet synchronized. QWindowPrivate::syncSceneGraph() is not calling endSync() anymore as it doesn't know whether it is the last window or not. Instead the renderloop is now responsible for calling endSync() once this is safe to do. Change-Id: Icb50ebfb447c928e38b41df7e26f3bfafdb4a811 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com> Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp1
-rw-r--r--src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp2
-rw-r--r--src/plugins/scenegraph/openvg/qsgopenvgrenderloop.cpp1
3 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp
index 60b76deb2e..0d3f78d95d 100644
--- a/src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp
+++ b/src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp
@@ -461,6 +461,7 @@ void QSGD3D12RenderLoop::renderWindow(QQuickWindow *window)
data.rc->initialize(nullptr);
wd->syncSceneGraph();
+ data.rc->endSync();
if (profileFrames)
syncTime = renderTimer.nsecsElapsed();
diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp
index 11cc257103..120a84566f 100644
--- a/src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp
+++ b/src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp
@@ -410,6 +410,7 @@ bool QSGD3D12RenderThread::event(QEvent *e)
QQuickWindowPrivate *wd = QQuickWindowPrivate::get(wme->window);
rc->initialize(nullptr);
wd->syncSceneGraph();
+ rc->endSync();
wd->renderSceneGraph(wme->window->size());
*wme->image = engine->executeAndWaitReadbackRenderTarget();
}
@@ -545,6 +546,7 @@ void QSGD3D12RenderThread::sync(bool inExpose)
rc->initialize(nullptr);
wd->syncSceneGraph();
+ rc->endSync();
if (!hadRenderer && wd->renderer) {
if (Q_UNLIKELY(debug_loop()))
diff --git a/src/plugins/scenegraph/openvg/qsgopenvgrenderloop.cpp b/src/plugins/scenegraph/openvg/qsgopenvgrenderloop.cpp
index f7aa704095..d31156f0eb 100644
--- a/src/plugins/scenegraph/openvg/qsgopenvgrenderloop.cpp
+++ b/src/plugins/scenegraph/openvg/qsgopenvgrenderloop.cpp
@@ -205,6 +205,7 @@ void QSGOpenVGRenderLoop::renderWindow(QQuickWindow *window)
emit window->afterAnimating();
cd->syncSceneGraph();
+ rc->endSync();
if (profileFrames)
syncTime = renderTimer.nsecsElapsed();