aboutsummaryrefslogtreecommitdiffstats
path: root/src/benchmarks/auto/creation/quick.image
diff options
context:
space:
mode:
Diffstat (limited to 'src/benchmarks/auto/creation/quick.image')
-rw-r--r--src/benchmarks/auto/creation/quick.image/delegates_image.qml23
-rw-r--r--src/benchmarks/auto/creation/quick.image/delegates_image_alpha.qml18
-rw-r--r--src/benchmarks/auto/creation/quick.image/delegates_image_antialiased.qml25
-rw-r--r--src/benchmarks/auto/creation/quick.image/delegates_image_async.qml25
-rw-r--r--src/benchmarks/auto/creation/quick.image/delegates_image_solid.qml18
5 files changed, 109 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
+ }
+}
diff --git a/src/benchmarks/auto/creation/quick.image/delegates_image_alpha.qml b/src/benchmarks/auto/creation/quick.image/delegates_image_alpha.qml
new file mode 100644
index 0000000..ba52256
--- /dev/null
+++ b/src/benchmarks/auto/creation/quick.image/delegates_image_alpha.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+// Test the creation of an Image with an ARGB PNG
+// Compare with delegates_image_solid
+CreationBenchmark {
+ id: root;
+ count: 50;
+ staticCount: 2500;
+
+ delegate: Image {
+ x: QmlBench.getRandom() * (root.width - width)
+ y: QmlBench.getRandom() * (root.height - height)
+ source: "qrc:///shared/alpha.png"
+ width: 20
+ height: 20
+ }
+}
diff --git a/src/benchmarks/auto/creation/quick.image/delegates_image_antialiased.qml b/src/benchmarks/auto/creation/quick.image/delegates_image_antialiased.qml
new file mode 100644
index 0000000..a61808b
--- /dev/null
+++ b/src/benchmarks/auto/creation/quick.image/delegates_image_antialiased.qml
@@ -0,0 +1,25 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+// Test the creation of an antialiased image.
+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
+ antialiasing: true
+ }
+}
+
diff --git a/src/benchmarks/auto/creation/quick.image/delegates_image_async.qml b/src/benchmarks/auto/creation/quick.image/delegates_image_async.qml
new file mode 100644
index 0000000..80e13d6
--- /dev/null
+++ b/src/benchmarks/auto/creation/quick.image/delegates_image_async.qml
@@ -0,0 +1,25 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+// Test the creation of an asynchronously loaded image.
+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
+ asynchronous: true
+ }
+}
+
diff --git a/src/benchmarks/auto/creation/quick.image/delegates_image_solid.qml b/src/benchmarks/auto/creation/quick.image/delegates_image_solid.qml
new file mode 100644
index 0000000..99ceba6
--- /dev/null
+++ b/src/benchmarks/auto/creation/quick.image/delegates_image_solid.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+// Test the creation of an Image with an RGB PNG
+// Compare with delegates_image_alpha
+CreationBenchmark {
+ id: root;
+ count: 50;
+ staticCount: 2500;
+
+ delegate: Image {
+ x: QmlBench.getRandom() * (root.width - width)
+ y: QmlBench.getRandom() * (root.height - height)
+ source: "qrc:///shared/solid.png"
+ width: 20
+ height: 20
+ }
+}