aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgthreadedrenderloop_p.h
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-02-15 15:35:04 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-19 12:17:42 +0100
commitaef7dad91640bb495b655012dbc7214a79195dff (patch)
tree053ce0048ebf3ffb0f65fd2b20c1db6ce6713f99 /src/quick/scenegraph/qsgthreadedrenderloop_p.h
parent0dc1c0554465d4e2546b75254371f3b8b01e957d (diff)
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>
Diffstat (limited to 'src/quick/scenegraph/qsgthreadedrenderloop_p.h')
-rw-r--r--src/quick/scenegraph/qsgthreadedrenderloop_p.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop_p.h b/src/quick/scenegraph/qsgthreadedrenderloop_p.h
index 4c297f500a..63b2b442e6 100644
--- a/src/quick/scenegraph/qsgthreadedrenderloop_p.h
+++ b/src/quick/scenegraph/qsgthreadedrenderloop_p.h
@@ -96,13 +96,14 @@ private:
bool anyoneShowing();
void initialize();
+ void maybePostPolishRequest();
+
void waitForReleaseComplete();
void polishAndSync();
struct Window {
QQuickWindow *window;
- uint pendingUpdate : 1;
};
QSGRenderThread *m_thread;
@@ -112,6 +113,8 @@ private:
int m_animation_timer;
int m_update_timer;
int m_exhaust_delay;
+
+ bool m_sync_triggered_update;
};