diff options
author | Robin Burchell <robin.burchell@crimson.no> | 2017-04-06 10:42:20 +0200 |
---|---|---|
committer | Robin Burchell <robin.burchell@crimson.no> | 2017-04-06 12:01:07 +0000 |
commit | 7cfe7eeeb92d42c5b0ebc58b2828b9a8012d36b6 (patch) | |
tree | 9550261c9caccb34e67b0f59f0d9849f0f23e512 /benchmarks | |
parent | 3824e5ee7d6f53375baa663377a40795348f80e3 (diff) |
Add a benchmark for Rectangle with a radius
This is a different codepath, often used, so it is a good idea to test it.
Change-Id: If30922dbd24df818cd4a62c6ec2076c1ad057884
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/auto/creation/quick/delegates_blendedrect.qml | 2 | ||||
-rw-r--r-- | benchmarks/auto/creation/quick/delegates_rect.qml | 2 | ||||
-rw-r--r-- | benchmarks/auto/creation/quick/delegates_rect_radius.qml | 19 |
3 files changed, 21 insertions, 2 deletions
diff --git a/benchmarks/auto/creation/quick/delegates_blendedrect.qml b/benchmarks/auto/creation/quick/delegates_blendedrect.qml index f52953e..c199152 100644 --- a/benchmarks/auto/creation/quick/delegates_blendedrect.qml +++ b/benchmarks/auto/creation/quick/delegates_blendedrect.qml @@ -2,7 +2,7 @@ import QtQuick 2.0 import QmlBench 1.0 // Tests the creation of rectangles with an alpha channel. -// Compare with delegates_rect. +// Compare with delegates_rect & delegates_rect_radius CreationBenchmark { id: root; count: 50 diff --git a/benchmarks/auto/creation/quick/delegates_rect.qml b/benchmarks/auto/creation/quick/delegates_rect.qml index 623ea61..07ecbcc 100644 --- a/benchmarks/auto/creation/quick/delegates_rect.qml +++ b/benchmarks/auto/creation/quick/delegates_rect.qml @@ -2,7 +2,7 @@ import QtQuick 2.0 import QmlBench 1.0 // Tests the creation of rectangles with *NO* alpha channel. -// Compare with delegates_blendedrect. +// Compare with delegates_blendedrect & delegates_rect_radius CreationBenchmark { id: root; count: 50; diff --git a/benchmarks/auto/creation/quick/delegates_rect_radius.qml b/benchmarks/auto/creation/quick/delegates_rect_radius.qml new file mode 100644 index 0000000..34c20df --- /dev/null +++ b/benchmarks/auto/creation/quick/delegates_rect_radius.qml @@ -0,0 +1,19 @@ +import QtQuick 2.0 +import QmlBench 1.0 + +// Tests the creation of rectangles with rounded corners. +// Compare with delegates_blendedrect & 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" + radius: 10 + } +} + |