Improved animations in the new render loop
authorGunnar Sletta <gunnar.sletta@digia.com>
Fri, 15 Feb 2013 14:35:04 +0000 (15:35 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 19 Feb 2013 11:17:42 +0000 (12:17 +0100)
commitaef7dad91640bb495b655012dbc7214a79195dff
tree053ce0048ebf3ffb0f65fd2b20c1db6ce6713f99
parent0dc1c0554465d4e2546b75254371f3b8b01e957d
Improved animations in the new render loop

To advance animations in line with vsync, we used a dedicated event
from the rendering thread which we fired immediately after sync. This
is a bit elaborate as we know in Gui when sync is complete and we can
just animate there and then.

This means we can remove all animation logic from the rendering
thread, making it simpler.

I also updated the syncAndRender pass so that it does not render
anything if the scene graph reported no changes during the
sync pass. This will prevent non-visual animations and property
updates from triggering render passes which will save quite a
few cycles.

Change-Id: I62bb5484f0673f99abe726fca5a9b424f6b0a317
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
src/quick/scenegraph/qsgthreadedrenderloop.cpp
src/quick/scenegraph/qsgthreadedrenderloop_p.h
tests/auto/quick/qquickwindow/data/focus.qml
tests/auto/quick/qquickwindow/data/ownershipRootItem.qml
tests/auto/quick/qquickwindow/tst_qquickwindow.cpp