aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-04-05 15:47:37 +0200
committerRobin Burchell <robin.burchell@crimson.no>2017-04-06 12:01:02 +0000
commit3824e5ee7d6f53375baa663377a40795348f80e3 (patch)
tree821da0a8baf39953728acbf108307668895e234a /benchmarks
parentecc249bfadf540a79c2e42d59356387b4963a721 (diff)
Add simple tests for scale/transform/rotation
We have two variants where possible: the "complex" version, and the "simple" version. Change-Id: I57f023a4f24f355272f21c568203fc46d7f3a01a Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/auto/creation/quick.transforms/delegates_item_rotated.qml18
-rw-r--r--benchmarks/auto/creation/quick.transforms/delegates_item_rotated_transform.qml21
-rw-r--r--benchmarks/auto/creation/quick.transforms/delegates_item_scaled.qml19
-rw-r--r--benchmarks/auto/creation/quick.transforms/delegates_item_scaled_transform.qml23
-rw-r--r--benchmarks/auto/creation/quick.transforms/delegates_item_translated.qml23
5 files changed, 104 insertions, 0 deletions
diff --git a/benchmarks/auto/creation/quick.transforms/delegates_item_rotated.qml b/benchmarks/auto/creation/quick.transforms/delegates_item_rotated.qml
new file mode 100644
index 0000000..8c36083
--- /dev/null
+++ b/benchmarks/auto/creation/quick.transforms/delegates_item_rotated.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+// Rotate an Item.
+// Compare with delegates_item_rotated_transform.
+CreationBenchmark {
+ id: root;
+ count: 50;
+ staticCount: 2500;
+ delegate: Item {
+ x: Math.random() * (root.width - width)
+ y: Math.random() * (root.height - height)
+ width: 30
+ height: 15
+ rotation: 45
+ }
+}
+
diff --git a/benchmarks/auto/creation/quick.transforms/delegates_item_rotated_transform.qml b/benchmarks/auto/creation/quick.transforms/delegates_item_rotated_transform.qml
new file mode 100644
index 0000000..055f13f
--- /dev/null
+++ b/benchmarks/auto/creation/quick.transforms/delegates_item_rotated_transform.qml
@@ -0,0 +1,21 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+// Rotate an Item.
+// Compare with delegates_item_rotated_transform.
+CreationBenchmark {
+ id: root;
+ count: 50;
+ staticCount: 2500;
+ delegate: Item {
+ x: Math.random() * (root.width - width)
+ y: Math.random() * (root.height - height)
+ width: 30
+ height: 15
+ transform: Rotation {
+ angle: 45
+ }
+ }
+}
+
+
diff --git a/benchmarks/auto/creation/quick.transforms/delegates_item_scaled.qml b/benchmarks/auto/creation/quick.transforms/delegates_item_scaled.qml
new file mode 100644
index 0000000..7121976
--- /dev/null
+++ b/benchmarks/auto/creation/quick.transforms/delegates_item_scaled.qml
@@ -0,0 +1,19 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+// Scale an Item.
+// Compare with delegates_item_scaled_transform.
+CreationBenchmark {
+ id: root;
+ count: 50;
+ staticCount: 2500;
+ delegate: Item {
+ x: Math.random() * (root.width - width)
+ y: Math.random() * (root.height - height)
+ width: 30
+ height: 15
+ scale: 10
+ }
+}
+
+
diff --git a/benchmarks/auto/creation/quick.transforms/delegates_item_scaled_transform.qml b/benchmarks/auto/creation/quick.transforms/delegates_item_scaled_transform.qml
new file mode 100644
index 0000000..b017921
--- /dev/null
+++ b/benchmarks/auto/creation/quick.transforms/delegates_item_scaled_transform.qml
@@ -0,0 +1,23 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+// Scale an Item.
+// Compare with delegates_item_scaled.
+CreationBenchmark {
+ id: root;
+ count: 50;
+ staticCount: 2500;
+ delegate: Item {
+ x: Math.random() * (root.width - width)
+ y: Math.random() * (root.height - height)
+ width: 30
+ height: 15
+ transform: Scale {
+ xScale: 10
+ yScale: 10
+ }
+ }
+}
+
+
+
diff --git a/benchmarks/auto/creation/quick.transforms/delegates_item_translated.qml b/benchmarks/auto/creation/quick.transforms/delegates_item_translated.qml
new file mode 100644
index 0000000..d8cf00c
--- /dev/null
+++ b/benchmarks/auto/creation/quick.transforms/delegates_item_translated.qml
@@ -0,0 +1,23 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+// Translate an item.
+CreationBenchmark {
+ id: root;
+ count: 50;
+ staticCount: 2500;
+ delegate: Item {
+ x: Math.random() * (root.width - width)
+ y: Math.random() * (root.height - height)
+ width: 30
+ height: 15
+ transform: Translate {
+ x: 10
+ y: 10
+ }
+ }
+}
+
+
+
+