diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-08-03 06:10:12 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-08-03 06:10:12 (GMT) |
commit | 418c1cf3ad9e3a39df21220805f0691a399dd041 (patch) | |
tree | b7fd747cab94b9cc4e6d2485bc966a3bf0755f41 /tests/benchmarks/declarative | |
parent | 9440ad04903f2e9c2d3019acc774084fb9a26c79 (diff) | |
download | Qt-418c1cf3ad9e3a39df21220805f0691a399dd041.zip Qt-418c1cf3ad9e3a39df21220805f0691a399dd041.tar.gz Qt-418c1cf3ad9e3a39df21220805f0691a399dd041.tar.bz2 |
Add another benchmark
Diffstat (limited to 'tests/benchmarks/declarative')
-rw-r--r-- | tests/benchmarks/declarative/qmlcomponent/samegame/BoomBlock.qml | 54 | ||||
-rw-r--r-- | tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStar.png | bin | 0 -> 278 bytes | |||
-rw-r--r-- | tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStone.png | bin | 0 -> 2691 bytes | |||
-rw-r--r-- | tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStar.png | bin | 0 -> 273 bytes | |||
-rw-r--r-- | tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStone.png | bin | 0 -> 2662 bytes | |||
-rw-r--r-- | tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStar.png | bin | 0 -> 274 bytes | |||
-rw-r--r-- | tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStone.png | bin | 0 -> 2604 bytes | |||
-rw-r--r-- | tests/benchmarks/declarative/qmlcomponent/samegame/pics/yellowStone.png | bin | 0 -> 2667 bytes | |||
-rw-r--r-- | tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp | 1 |
9 files changed, 55 insertions, 0 deletions
diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/BoomBlock.qml b/tests/benchmarks/declarative/qmlcomponent/samegame/BoomBlock.qml new file mode 100644 index 0000000..8a505da --- /dev/null +++ b/tests/benchmarks/declarative/qmlcomponent/samegame/BoomBlock.qml @@ -0,0 +1,54 @@ +import Qt 4.6 + +Item { id:block + property bool dying: false + property bool spawned: false + property int type: 0 + property int targetX: 0 + property int targetY: 0 + + x: Follow { enabled: spawned; source: targetX; spring: 2; damping: 0.2 } + y: Follow { source: targetY; spring: 2; damping: 0.2 } + + Image { id: img + source: { + if(type == 0){ + "pics/redStone.png"; + } else if(type == 1) { + "pics/blueStone.png"; + } else { + "pics/greenStone.png"; + } + } + opacity: 0 + opacity: Behavior { NumberAnimation { properties:"opacity"; duration: 200 } } + anchors.fill: parent + } + + Particles { id: particles + width:1; height:1; anchors.centerIn: parent; opacity: 0 + lifeSpan: 700; lifeSpanDeviation: 600; count:0; streamIn: false + angle: 0; angleDeviation: 360; velocity: 100; velocityDeviation:30 + source: { + if(type == 0){ + "pics/redStar.png"; + } else if (type == 1) { + "pics/blueStar.png"; + } else { + "pics/greenStar.png"; + } + } + } + + states: [ + State{ name: "AliveState"; when: spawned == true && dying == false + SetProperties { target: img; opacity: 1 } + }, + State{ name: "DeathState"; when: dying == true + SetProperties { target: particles; count: 50 } + SetProperties { target: particles; opacity: 1 } + SetProperties { target: particles; emitting: false } // i.e. emit only once + SetProperties { target: img; opacity: 0 } + } + ] +} diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStar.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStar.png Binary files differnew file mode 100644 index 0000000..ff9588f --- /dev/null +++ b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStar.png diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStone.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStone.png Binary files differnew file mode 100644 index 0000000..bf342e0 --- /dev/null +++ b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/blueStone.png diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStar.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStar.png Binary files differnew file mode 100644 index 0000000..cd06854 --- /dev/null +++ b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStar.png diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStone.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStone.png Binary files differnew file mode 100644 index 0000000..5ac14a5 --- /dev/null +++ b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/greenStone.png diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStar.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStar.png Binary files differnew file mode 100644 index 0000000..0a4dffe --- /dev/null +++ b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStar.png diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStone.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStone.png Binary files differnew file mode 100644 index 0000000..b099f60 --- /dev/null +++ b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/redStone.png diff --git a/tests/benchmarks/declarative/qmlcomponent/samegame/pics/yellowStone.png b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/yellowStone.png Binary files differnew file mode 100644 index 0000000..c56124a --- /dev/null +++ b/tests/benchmarks/declarative/qmlcomponent/samegame/pics/yellowStone.png diff --git a/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp b/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp index 1920bf2..f032004 100644 --- a/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp +++ b/tests/benchmarks/declarative/qmlcomponent/tst_qmlcomponent.cpp @@ -60,6 +60,7 @@ void tst_qmlcomponent::creation_data() QTest::newRow("MyQmlObject: basic binding") << "myqmlobject_binding.txt"; QTest::newRow("Synthesized properties") << "synthesized_properties.txt"; QTest::newRow("Synthesized properties.2") << "synthesized_properties.2.txt"; + QTest::newRow("SameGame - BoomBlock") << "samegame/BoomBlock.qml"; } void tst_qmlcomponent::creation() |