diff options
Diffstat (limited to 'src/benchmarks/auto/creation/quick.rectangle')
5 files changed, 94 insertions, 0 deletions
diff --git a/src/benchmarks/auto/creation/quick.rectangle/delegates_rect.qml b/src/benchmarks/auto/creation/quick.rectangle/delegates_rect.qml new file mode 100644 index 0000000..a840b1c --- /dev/null +++ b/src/benchmarks/auto/creation/quick.rectangle/delegates_rect.qml @@ -0,0 +1,17 @@ +import QtQuick 2.0 +import QmlBench 1.0 + +// Tests the creation of rectangles with *NO* alpha channel. +// Compare with delegates_rect_blended & delegates_rect_radius +CreationBenchmark { + id: root; + count: 50; + staticCount: 2500; + delegate: Rectangle { + x: QmlBench.getRandom() * (root.width - width) + y: QmlBench.getRandom() * (root.height - height) + width: 30 + height: 15 + color: "steelblue" + } +} diff --git a/src/benchmarks/auto/creation/quick.rectangle/delegates_rect_blended.qml b/src/benchmarks/auto/creation/quick.rectangle/delegates_rect_blended.qml new file mode 100644 index 0000000..5baa902 --- /dev/null +++ b/src/benchmarks/auto/creation/quick.rectangle/delegates_rect_blended.qml @@ -0,0 +1,18 @@ +import QtQuick 2.0 +import QmlBench 1.0 + +// Tests the creation of rectangles with an alpha channel. +// Compare with delegates_rect & delegates_rect_radius +CreationBenchmark { + id: root; + count: 50 + staticCount: 2500 + delegate: Rectangle { + x: QmlBench.getRandom() * (root.width - width) + y: QmlBench.getRandom() * (root.height - height) + width: 30 + height: 15 + color: Qt.hsla(0.7, 0.3, 0.6, 0.5); + } +} + diff --git a/src/benchmarks/auto/creation/quick.rectangle/delegates_rect_border.qml b/src/benchmarks/auto/creation/quick.rectangle/delegates_rect_border.qml new file mode 100644 index 0000000..86a47c2 --- /dev/null +++ b/src/benchmarks/auto/creation/quick.rectangle/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: QmlBench.getRandom() * (root.width - width) + y: QmlBench.getRandom() * (root.height - height) + width: 30 + height: 15 + color: "steelblue" + border.width: 5 + border.color: "#000000" + } +} + diff --git a/src/benchmarks/auto/creation/quick.rectangle/delegates_rect_gradient.qml b/src/benchmarks/auto/creation/quick.rectangle/delegates_rect_gradient.qml new file mode 100644 index 0000000..85c3158 --- /dev/null +++ b/src/benchmarks/auto/creation/quick.rectangle/delegates_rect_gradient.qml @@ -0,0 +1,20 @@ +import QtQuick 2.0 +import QmlBench 1.0 + +// Tests the creation of rectangles with a gradient +CreationBenchmark { + id: root; + count: 50; + staticCount: 2500; + delegate: Rectangle { + x: QmlBench.getRandom() * (root.width - width) + y: QmlBench.getRandom() * (root.height - height) + width: 30 + height: 15 + gradient: Gradient { + GradientStop { position: 0.0; color: "#ff0000" } + GradientStop { position: 1.0; color: "#0000ff" } + } + } +} + diff --git a/src/benchmarks/auto/creation/quick.rectangle/delegates_rect_radius.qml b/src/benchmarks/auto/creation/quick.rectangle/delegates_rect_radius.qml new file mode 100644 index 0000000..693ede4 --- /dev/null +++ b/src/benchmarks/auto/creation/quick.rectangle/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_rect_blended & delegates_rect +CreationBenchmark { + id: root; + count: 50; + staticCount: 2500; + delegate: Rectangle { + x: QmlBench.getRandom() * (root.width - width) + y: QmlBench.getRandom() * (root.height - height) + width: 30 + height: 15 + color: "steelblue" + radius: 10 + } +} + |