diff options
author | Robin Burchell <robin.burchell@crimson.no> | 2017-04-06 12:35:37 +0200 |
---|---|---|
committer | Robin Burchell <robin.burchell@crimson.no> | 2017-04-06 12:01:41 +0000 |
commit | 1a7fee6a933b3019ee6f43cd598d5c93a209d088 (patch) | |
tree | d121665ca88ffd184affce136423b37a1fcef5bf /benchmarks | |
parent | 2bde3aba9e8aea2c634e82e27b536a36928fcaf8 (diff) |
Add a benchmark for ARGB vs RGB images
These are actually treated differently, so it makes sense to test.
Change-Id: Ibeea3e2003f7d425e1aa62bffd0837107cd47d9f
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Diffstat (limited to 'benchmarks')
3 files changed, 37 insertions, 0 deletions
diff --git a/benchmarks/auto/creation/quick.image/delegates_image.qml b/benchmarks/auto/creation/quick.image/delegates_image.qml index ddc2ae9..f144e84 100644 --- a/benchmarks/auto/creation/quick.image/delegates_image.qml +++ b/benchmarks/auto/creation/quick.image/delegates_image.qml @@ -1,6 +1,7 @@ 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; diff --git a/benchmarks/auto/creation/quick.image/delegates_image_alpha.qml b/benchmarks/auto/creation/quick.image/delegates_image_alpha.qml new file mode 100644 index 0000000..5f66ddb --- /dev/null +++ b/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: Math.random() * (root.width - width) + y: Math.random() * (root.height - height) + source: "../../../../shared/alpha.png" + width: 20 + height: 20 + } +} diff --git a/benchmarks/auto/creation/quick.image/delegates_image_solid.qml b/benchmarks/auto/creation/quick.image/delegates_image_solid.qml new file mode 100644 index 0000000..2ede025 --- /dev/null +++ b/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: Math.random() * (root.width - width) + y: Math.random() * (root.height - height) + source: "../../../../shared/solid.png" + width: 20 + height: 20 + } +} |