diff options
author | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-03-05 15:38:02 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-14 10:45:53 +0100 |
commit | 1656d6006bb797ad8489a0d8034f65d670895834 (patch) | |
tree | dfcc27d5930b4b83fc6eb6d7da117c1ec807057c /src/quick/scenegraph/qsgwindowsrenderloop.cpp | |
parent | 99308192510bbfd7c508a2aabcbef18445c61584 (diff) |
Make sure QSGRenderLoop is cleaned up cleanly.
e13547c595913c58e6bd6a5ed80fdc729fae7d47 used a global static to clean
up QSGRenderLoop which is triggered very late, potentially after
SG backend API plugins have been unloaded. This results in crashes
when used in combination with scenegraph-playgrounds's customcontext.
Partially revert the change and instead clean up at the time of
QApp::aboutToQuit and make sure we also disconnect cleanly from
all QQuickWindows.
This change also ensures that QSGRenderLoop::windowDestroyed() gets
called for all QQuickWindows registered with the render loop. This
ensures that rendering stops and that scene graph nodes and resources
will be cleaned up regardless of whether the application has
remembered to delete the window or not. This is a good thing as it
makes the scene graph shutdown a bit cleaner.
Change-Id: I9cb9093979f8eac05542f118a6ff9cfe5c84f745
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgwindowsrenderloop.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgwindowsrenderloop.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgwindowsrenderloop.cpp b/src/quick/scenegraph/qsgwindowsrenderloop.cpp index 913b737798..cbe9ea384b 100644 --- a/src/quick/scenegraph/qsgwindowsrenderloop.cpp +++ b/src/quick/scenegraph/qsgwindowsrenderloop.cpp @@ -111,6 +111,15 @@ QSGWindowsRenderLoop::~QSGWindowsRenderLoop() delete m_sg; } +QList<QQuickWindow *> QSGWindowsRenderLoop::windows() const +{ + QList<QQuickWindow *> list; + foreach (const WindowData &w, m_windows) + list << w.window; + return list; +} + + bool QSGWindowsRenderLoop::interleaveIncubation() const { return m_animationDriver->isRunning() && anyoneShowing(); |