Implement "headless mode" for hidden QQuickCanvases
authorGunnar Sletta <gunnar.sletta@nokia.com>
Thu, 8 Dec 2011 12:24:17 +0000 (13:24 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 19 Dec 2011 13:23:12 +0000 (14:23 +0100)
commit6efca58ab943bbd8c91c8f12ad47484677e2cf60
treed1d5629d17451f36abaca975eed92d9132269e01
parent8460eae44c241d5975b3041eedf6e08c9638fd41
Implement "headless mode" for hidden QQuickCanvases

When all views are hidden, we stop the rendering thread,
kill the OpenGL context and all scene graph content.
The entire scenegraph is recreated based on the QML scene
when a view is shown again.

Change-Id: I734619d9f29263a5cdecbcc9b88c3808d1d64a7f
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
src/quick/items/qquickcanvas.cpp
src/quick/items/qquickwindowmanager.cpp
src/quick/scenegraph/qsgcontext.cpp
tests/auto/qtquick2/qquickcanvas/data/Headless.qml [new file with mode: 0644]
tests/auto/qtquick2/qquickcanvas/data/colors.png [new file with mode: 0644]
tests/auto/qtquick2/qquickcanvas/qquickcanvas.pro
tests/auto/qtquick2/qquickcanvas/tst_qquickcanvas.cpp