summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-03-23 06:12:38 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-03-24 03:28:39 (GMT)
commit738c3a68e5ebe8051234ba17a15f2e0585f3d722 (patch)
tree58fb10f3966158fd0df8855c361b3a946cf9e287 /tests/benchmarks
parent4d82dd604c4f6aedbf3ed0eabcf89d3dca3d0a88 (diff)
downloadQt-738c3a68e5ebe8051234ba17a15f2e0585f3d722.zip
Qt-738c3a68e5ebe8051234ba17a15f2e0585f3d722.tar.gz
Qt-738c3a68e5ebe8051234ba17a15f2e0585f3d722.tar.bz2
Animation construction optimization.
Use setParent_NoEvent when parenting to group.
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/animation/large.qml41
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/animation/largeNoProps.qml41
2 files changed, 82 insertions, 0 deletions
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/animation/large.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/animation/large.qml
new file mode 100644
index 0000000..978e3bf
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/animation/large.qml
@@ -0,0 +1,41 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+
+ QDeclarativeTime.Timer {
+ component: Component {
+ ParallelAnimation {
+ NumberAnimation { duration: 500 }
+ NumberAnimation { duration: 4000; }
+ NumberAnimation { duration: 2000; easing.type: "OutBack"}
+ ColorAnimation { duration: 3000}
+ SequentialAnimation {
+ PauseAnimation { duration: 1000 }
+ ScriptAction { script: doSomething(); }
+ PauseAnimation { duration: 800 }
+ ScriptAction { script: doSomethingElse(); }
+ PauseAnimation { duration: 800 }
+ ParallelAnimation {
+ NumberAnimation { duration: 200;}
+ SequentialAnimation {
+ PauseAnimation { duration: 200}
+ ParallelAnimation {
+ NumberAnimation { duration: 300;}
+ NumberAnimation { duration: 300;}
+ }
+ NumberAnimation { from: 0; to: 1; duration: 500 }
+ PauseAnimation { duration: 200 }
+ NumberAnimation { from: 1; to: 0; duration: 500 }
+ }
+ SequentialAnimation {
+ PauseAnimation { duration: 150}
+ NumberAnimation { duration: 300; easing.type: "OutBounce" }
+ }
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/animation/largeNoProps.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/animation/largeNoProps.qml
new file mode 100644
index 0000000..cceb3f4
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/animation/largeNoProps.qml
@@ -0,0 +1,41 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+
+ QDeclarativeTime.Timer {
+ component: Component {
+ ParallelAnimation {
+ NumberAnimation { }
+ NumberAnimation { }
+ NumberAnimation { }
+ ColorAnimation { }
+ SequentialAnimation {
+ PauseAnimation { }
+ ScriptAction { }
+ PauseAnimation { }
+ ScriptAction { }
+ PauseAnimation { }
+ ParallelAnimation {
+ NumberAnimation { }
+ SequentialAnimation {
+ PauseAnimation { }
+ ParallelAnimation {
+ NumberAnimation { }
+ NumberAnimation { }
+ }
+ NumberAnimation { }
+ PauseAnimation { }
+ NumberAnimation { }
+ }
+ SequentialAnimation {
+ PauseAnimation { }
+ NumberAnimation { }
+ }
+ }
+ }
+ }
+ }
+ }
+
+}