aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-03-14 14:53:08 +0100
committerRobin Burchell <robin.burchell@crimson.no>2017-03-14 15:00:40 +0000
commit0eebf8de18b0af61f2e04521d9190eed70f5bb55 (patch)
tree28c672a9c20fc6b8022b341cd8851656e4e5b408
parent05a4d31d6aa397ba8ea0179af4bfc3a71a52042b (diff)
Remove sprite-* benchmarks
sprite-sequence isn't really of much use. It was written to demonstrate that SpriteSequence isn't really very performant. sprite-image was written to compare against SpriteSequence, and while a little more useful, the implementation is inherently flaky for two reasons: * It uses Math.random to calculate wait times * It uses PauseAnimation, which means that the test periodically doesn't run at full throttle Since it isn't terribly useful as a benchmark for regression testing, let's simply remove the two of them. Change-Id: I594928c441f5e6240522881d27711e7580e86b91 Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
-rw-r--r--benchmark/images/sprite-image.qml47
-rw-r--r--benchmark/images/sprite-sequence.qml46
2 files changed, 0 insertions, 93 deletions
diff --git a/benchmark/images/sprite-image.qml b/benchmark/images/sprite-image.qml
deleted file mode 100644
index b5f5b28..0000000
--- a/benchmark/images/sprite-image.qml
+++ /dev/null
@@ -1,47 +0,0 @@
-import QtQuick 2.2
-
-Item {
- id: root;
-
- property real cellSize: Math.floor(Math.sqrt(width * height / count))
- property size srcSize: Qt.size(cellSize, cellSize);
-
- property int count: 200
- property int staticCount: 0
-
- Grid {
- width: root.width
- height: root.height
- columns: Math.ceil(root.width / root.cellSize);
- rows: Math.ceil(root.height / root.cellSize);
- Repeater {
- model: root.count
-
- Item {
- id: sprite
- width: root.cellSize
- height: root.cellSize
-
- Image { id: imgWide; anchors.fill: parent; visible: false; source: "../butterfly-wide.png"; sourceSize: root.srcSize }
- Image { id: imgHalf; anchors.fill: parent; visible: false; source: "../butterfly-half.png"; sourceSize: root.srcSize }
- Image { id: imgSmall; anchors.fill: parent; visible: false; source: "../butterfly-collapsed.png"; sourceSize: root.srcSize }
-
- SequentialAnimation {
- running: true
- PropertyAction { target: imgWide; property: "visible"; value: true; }
- PauseAnimation { duration: Math.random() * 500; }
- PauseAnimation { duration: 300 }
- PropertyAction { target: imgWide; property: "visible"; value: false; }
- PropertyAction { target: imgHalf; property: "visible"; value: true; }
- PauseAnimation { duration: 300 }
- PropertyAction { target: imgHalf; property: "visible"; value: false; }
- PropertyAction { target: imgSmall; property: "visible"; value: true; }
- PauseAnimation { duration: 300 }
- PropertyAction { target: imgSmall; property: "visible"; value: false; }
-
- loops: Animation.Infinite
- }
- }
- }
- }
-}
diff --git a/benchmark/images/sprite-sequence.qml b/benchmark/images/sprite-sequence.qml
deleted file mode 100644
index f3446ca..0000000
--- a/benchmark/images/sprite-sequence.qml
+++ /dev/null
@@ -1,46 +0,0 @@
-import QtQuick 2.2
-
-Item {
- id: root;
-
- property real cellSize: Math.floor(Math.sqrt(width * height / count))
- property int count: 200
- property int staticCount: 0
-
- Grid {
- width: root.width
- height: root.height
- columns: Math.ceil(root.width / root.cellSize);
- rows: Math.ceil(root.height / root.cellSize);
- Repeater {
- model: root.count
- SpriteSequence {
- id: sprite
- width: root.cellSize
- height: root.cellSize
- Sprite {
- name: "one"
- source: "../butterfly-wide.png"
- frameCount: 1
- frameDuration: 300 + Math.random() * 300
- to: { "two" : 1 }
- }
- Sprite {
- name: "two"
- source: "../butterfly-half.png"
- frameCount: 1
- frameDuration: 300
- to: { "three" : 1 }
- }
- Sprite {
- name: "three"
- source: "../butterfly-collapsed.png"
- frameCount: 1
- frameDuration: 300
- to: { "one" : 1 }
- }
-
- }
- }
- }
-}