aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-04-06 10:50:11 +0200
committerRobin Burchell <robin.burchell@crimson.no>2017-04-06 12:01:15 +0000
commit24b672cf0ef0e9f5e5d18f402115a64c7f9fe0f3 (patch)
tree0298e94c8377cac49061998e7e6ebe1cfa81a3e0 /benchmarks
parent7cfe7eeeb92d42c5b0ebc58b2828b9a8012d36b6 (diff)
Add a benchmark covering rectangle borders
These are used reasonably often, and easy to test, so cover it. Change-Id: I2a1580bf9666199da8bc957191b0aa6fa96c4ead Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/auto/creation/quick/delegates_rect_border.qml20
1 files changed, 20 insertions, 0 deletions
diff --git a/benchmarks/auto/creation/quick/delegates_rect_border.qml b/benchmarks/auto/creation/quick/delegates_rect_border.qml
new file mode 100644
index 0000000..43b4ed1
--- /dev/null
+++ b/benchmarks/auto/creation/quick/delegates_rect_border.qml
@@ -0,0 +1,20 @@
+import QtQuick 2.0
+import QmlBench 1.0
+
+// Tests the creation of rectangles with a border
+// Compare with delegates_rect
+CreationBenchmark {
+ id: root;
+ count: 50;
+ staticCount: 2500;
+ delegate: Rectangle {
+ x: Math.random() * (root.width - width)
+ y: Math.random() * (root.height - height)
+ width: 30
+ height: 15
+ color: "steelblue"
+ border.width: 5
+ border.color: "#000000"
+ }
+}
+