aboutsummaryrefslogtreecommitdiffstats
path: root/src/benchmarks/auto/creation/quick.image/delegates_image.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/benchmarks/auto/creation/quick.image/delegates_image.qml')
-rw-r--r--src/benchmarks/auto/creation/quick.image/delegates_image.qml23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/benchmarks/auto/creation/quick.image/delegates_image.qml b/src/benchmarks/auto/creation/quick.image/delegates_image.qml
new file mode 100644
index 0000000..93432ed
--- /dev/null
+++ b/src/benchmarks/auto/creation/quick.image/delegates_image.qml
@@ -0,0 +1,23 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+// Test the creation of an Image with fairly stock settings (synchronous, no AA)
+CreationBenchmark {
+ id: root;
+ count: 50;
+ staticCount: 2500;
+
+ property var names: [
+ "butterfly-wide.png",
+ "butterfly-half.png",
+ "butterfly-collapsed.png"
+ ];
+
+ delegate: Image {
+ x: QmlBench.getRandom() * (root.width - width)
+ y: QmlBench.getRandom() * (root.height - height)
+ source: "qrc:///shared/" + root.names[index % 3];
+ width: 20
+ height: 20
+ }
+}