aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brasser <mbrasser@ford.com>2017-05-26 15:26:45 -0500
committerMichael Brasser <michael.brasser@live.com>2017-07-10 18:09:45 +0000
commit02094865ebf5cf810760fe4f8c874180bdb0685c (patch)
treed35db4f0de86c44cb85f28e79a813e0a8bdefeae
parenta379d290669c6c6a2676e4405e2ab79343b668e0 (diff)
Add additional ShaderEffect benchmark
Custom properties on ShaderEffect can carry greater than normal cost. Explicitly test a ShaderEffect with such a property. Change-Id: Ib1344646585937f15a1c6c8b05806a4cea723994 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
-rw-r--r--benchmarks/auto/creation/quick/delegates_shadereffect_props.qml26
1 files changed, 26 insertions, 0 deletions
diff --git a/benchmarks/auto/creation/quick/delegates_shadereffect_props.qml b/benchmarks/auto/creation/quick/delegates_shadereffect_props.qml
new file mode 100644
index 0000000..6d53309
--- /dev/null
+++ b/benchmarks/auto/creation/quick/delegates_shadereffect_props.qml
@@ -0,0 +1,26 @@
+import QtQuick 2.4
+import QmlBench 1.0
+
+// Tests the creation of ShaderEffect with custom properties,
+// as these add additional cost
+CreationBenchmark {
+ id: root;
+ count: 50;
+ staticCount: 2500;
+
+ Image {
+ id: sourceImage
+ source: "../../../../shared/butterfly-wide.png"
+ }
+
+ delegate: ShaderEffect {
+ x: Math.random() * (root.width - width)
+ y: Math.random() * (root.height - height)
+ width: sourceImage.width
+ height: sourceImage.height
+ supportsAtlasTextures: true
+ property var source: sourceImage
+ }
+}
+
+