aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-01-11 23:29:23 +0100
committerRobin Burchell <robin.burchell@crimson.no>2017-01-12 19:19:26 +0000
commit93df3e3a3118080dcd6d9416d1622b88d99c4b8d (patch)
tree582046f7f35eb3050c9615bd4e15760e3027e6c5 /src/plugins
parentc2e46b9d9140903f5b563f8835c11d4491452405 (diff)
QSGThreadedRenderLoop: Correctly stop the animation timer ...
... when destroying the last window while it is still visible. For the case of windowDestroyed(), the QQuickWindow can still be isVisible true and isExposed true. Given these circumstances, we would not stop the timer (assuming that we needed to keep it running), but this is actually wrong when we are evaluating a timer change depending on the window being destroyed. By calling startOrStopAnimationTimer again, after the window has been removed from m_windows, we will successfully stop the timer -- the only cost being an unnecessary polish event being sent from the first call (which will be ignored). Task-number: QTBUG-58091 Change-Id: I043ce5d88eafee15019e1c8d41c06d531d1da059 Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp
index 317471eeec..11cc257103 100644
--- a/src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp
+++ b/src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp
@@ -773,6 +773,11 @@ void QSGD3D12ThreadedRenderLoop::windowDestroyed(QQuickWindow *window)
break;
}
}
+
+ // Now that we altered the window list, we may need to stop the animation
+ // timer even if we didn't via handleObscurity. This covers the case where
+ // we destroy a visible & exposed QQuickWindow.
+ startOrStopAnimationTimer();
}
void QSGD3D12ThreadedRenderLoop::exposureChanged(QQuickWindow *window)