aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-05-02 11:31:29 +0200
committerRobin Burchell <robin.burchell@crimson.no>2017-05-02 11:37:13 +0000
commit204940482f21f532dc644480ad8b94076c91e382 (patch)
tree527e3613b7196f709ca0b357bfe4de3cccb6cc4f
parentf104e15d05ef7b136f2e922e897012ebd8c1ca34 (diff)
Shell_TotalFramesWithStaticCount: Stop running 't' ticker when reporting results
Otherwise, due to queued signal handling, we may start processing another (useless) run when 't' ticks before the queued signal to quit kicks in. Change-Id: I52cd0311e82363cec2f60ca19a85ff653a9b68fb Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
-rw-r--r--src/Shell_TotalFramesWithStaticCount.qml12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Shell_TotalFramesWithStaticCount.qml b/src/Shell_TotalFramesWithStaticCount.qml
index e6a54de..d9c83a9 100644
--- a/src/Shell_TotalFramesWithStaticCount.qml
+++ b/src/Shell_TotalFramesWithStaticCount.qml
@@ -77,7 +77,13 @@ Item {
width: parent.height
height: parent.height
property real t;
- NumberAnimation on t { from: 0; to: 1; duration: 1000; loops: Animation.Infinite }
+ NumberAnimation on t {
+ id: swapAnimation
+ from: 0;
+ to: 1;
+ duration: 1000;
+ loops: Animation.Infinite
+ }
property bool inv;
property int countDown: 5;
onTChanged: {
@@ -99,6 +105,10 @@ Item {
id: fpsTimer
interval: benchmark.frameCountInterval
onTriggered: {
+ // Stop the 't' ticker. Otherwise we may accidentally begin one
+ // more interval, since recordOperationsPerFrame will quit us on
+ // a queued signal.
+ swapAnimation.running = false
benchmark.recordOperationsPerFrame(root.count);
}
}