aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-03-30 12:35:37 +0200
committerRobin Burchell <robin.burchell@crimson.no>2017-03-30 14:32:18 +0000
commitb9004ced0e06448636a00b04db667ef7a3608995 (patch)
tree4b06de8bd84ff6a17b99af144ca6fdec338524c3 /benchmarks
parentd7a9410207f1c7da60b5885e0333758789745035 (diff)
Canvas: Update benchmarks to use helpers
Also remove delegates_canvas_image_immediate_with_context.qml -- this is not the right place to test performance of this, let's limit ourselves to creation for now. Change-Id: Ic59dfdff7658130525fcd7d886b61897563a6d01 Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/auto/creation/quick.canvas/delegates_canvas_fbo_cooperative.qml36
-rw-r--r--benchmarks/auto/creation/quick.canvas/delegates_canvas_fbo_immediate.qml36
-rw-r--r--benchmarks/auto/creation/quick.canvas/delegates_canvas_fbo_threaded.qml36
-rw-r--r--benchmarks/auto/creation/quick.canvas/delegates_canvas_image_cooperative.qml36
-rw-r--r--benchmarks/auto/creation/quick.canvas/delegates_canvas_image_immediate.qml36
-rw-r--r--benchmarks/auto/creation/quick.canvas/delegates_canvas_image_immediate_with_context.qml41
-rw-r--r--benchmarks/auto/creation/quick.canvas/delegates_canvas_image_threaded.qml36
7 files changed, 72 insertions, 185 deletions
diff --git a/benchmarks/auto/creation/quick.canvas/delegates_canvas_fbo_cooperative.qml b/benchmarks/auto/creation/quick.canvas/delegates_canvas_fbo_cooperative.qml
index b847ccd..cf95eae 100644
--- a/benchmarks/auto/creation/quick.canvas/delegates_canvas_fbo_cooperative.qml
+++ b/benchmarks/auto/creation/quick.canvas/delegates_canvas_fbo_cooperative.qml
@@ -1,31 +1,19 @@
import QtQuick 2.0
+import QmlBench 1.0
// Testing the performance of creating a canvas
-Item {
+CreationBenchmark {
id: root;
- property int count: 50;
- property int staticCount: 2500;
-
- property real t;
- NumberAnimation on t { from: 0; to: 1; duration: 1000; loops: Animation.Infinite }
- onTChanged: {
- repeater.model = 0;
- repeater.model = root.count
- }
-
- Component.onCompleted: repeater.model = root.count
-
- Repeater {
- id: repeater
- Canvas {
- x: Math.random() * (root.width - width)
- y: Math.random() * (root.height - height)
- width: 30
- height: 15
- renderTarget: Canvas.FramebufferObject
- renderStrategy: Canvas.Cooperative
- // *just* measuring canvas creation. nothing else.
- }
+ count: 50;
+ staticCount: 2500;
+ delegate: Canvas {
+ x: Math.random() * (root.width - width)
+ y: Math.random() * (root.height - height)
+ width: 30
+ height: 15
+ renderTarget: Canvas.FramebufferObject
+ renderStrategy: Canvas.Cooperative
+ // *just* measuring canvas creation. nothing else.
}
}
diff --git a/benchmarks/auto/creation/quick.canvas/delegates_canvas_fbo_immediate.qml b/benchmarks/auto/creation/quick.canvas/delegates_canvas_fbo_immediate.qml
index 4425f08..f726d9b 100644
--- a/benchmarks/auto/creation/quick.canvas/delegates_canvas_fbo_immediate.qml
+++ b/benchmarks/auto/creation/quick.canvas/delegates_canvas_fbo_immediate.qml
@@ -1,31 +1,19 @@
import QtQuick 2.0
+import QmlBench 1.0
// Testing the performance of creating a canvas
-Item {
+CreationBenchmark {
id: root;
- property int count: 50;
- property int staticCount: 2500;
-
- property real t;
- NumberAnimation on t { from: 0; to: 1; duration: 1000; loops: Animation.Infinite }
- onTChanged: {
- repeater.model = 0;
- repeater.model = root.count
- }
-
- Component.onCompleted: repeater.model = root.count
-
- Repeater {
- id: repeater
- Canvas {
- x: Math.random() * (root.width - width)
- y: Math.random() * (root.height - height)
- width: 30
- height: 15
- renderTarget: Canvas.FramebufferObject
- renderStrategy: Canvas.Immediate
- // *just* measuring canvas creation. nothing else.
- }
+ count: 50;
+ staticCount: 2500;
+ delegate: Canvas {
+ x: Math.random() * (root.width - width)
+ y: Math.random() * (root.height - height)
+ width: 30
+ height: 15
+ renderTarget: Canvas.FramebufferObject
+ renderStrategy: Canvas.Immediate
+ // *just* measuring canvas creation. nothing else.
}
}
diff --git a/benchmarks/auto/creation/quick.canvas/delegates_canvas_fbo_threaded.qml b/benchmarks/auto/creation/quick.canvas/delegates_canvas_fbo_threaded.qml
index 80a6c23..b16a891 100644
--- a/benchmarks/auto/creation/quick.canvas/delegates_canvas_fbo_threaded.qml
+++ b/benchmarks/auto/creation/quick.canvas/delegates_canvas_fbo_threaded.qml
@@ -1,31 +1,19 @@
import QtQuick 2.0
+import QmlBench 1.0
// Testing the performance of creating a canvas
-Item {
+CreationBenchmark {
id: root;
- property int count: 50;
- property int staticCount: 2500;
-
- property real t;
- NumberAnimation on t { from: 0; to: 1; duration: 1000; loops: Animation.Infinite }
- onTChanged: {
- repeater.model = 0;
- repeater.model = root.count
- }
-
- Component.onCompleted: repeater.model = root.count
-
- Repeater {
- id: repeater
- Canvas {
- x: Math.random() * (root.width - width)
- y: Math.random() * (root.height - height)
- width: 30
- height: 15
- renderTarget: Canvas.FramebufferObject
- renderStrategy: Canvas.Threaded
- // *just* measuring canvas creation. nothing else.
- }
+ count: 50;
+ staticCount: 2500;
+ delegate: Canvas {
+ x: Math.random() * (root.width - width)
+ y: Math.random() * (root.height - height)
+ width: 30
+ height: 15
+ renderTarget: Canvas.FramebufferObject
+ renderStrategy: Canvas.Threaded
+ // *just* measuring canvas creation. nothing else.
}
}
diff --git a/benchmarks/auto/creation/quick.canvas/delegates_canvas_image_cooperative.qml b/benchmarks/auto/creation/quick.canvas/delegates_canvas_image_cooperative.qml
index 9695014..0e79715 100644
--- a/benchmarks/auto/creation/quick.canvas/delegates_canvas_image_cooperative.qml
+++ b/benchmarks/auto/creation/quick.canvas/delegates_canvas_image_cooperative.qml
@@ -1,31 +1,19 @@
import QtQuick 2.0
+import QmlBench 1.0
// Testing the performance of creating a canvas
-Item {
+CreationBenchmark {
id: root;
- property int count: 50;
- property int staticCount: 2500;
-
- property real t;
- NumberAnimation on t { from: 0; to: 1; duration: 1000; loops: Animation.Infinite }
- onTChanged: {
- repeater.model = 0;
- repeater.model = root.count
- }
-
- Component.onCompleted: repeater.model = root.count
-
- Repeater {
- id: repeater
- Canvas {
- x: Math.random() * (root.width - width)
- y: Math.random() * (root.height - height)
- width: 30
- height: 15
- renderTarget: Canvas.Image
- renderStrategy: Canvas.Cooperative
- // *just* measuring canvas creation. nothing else.
- }
+ count: 50;
+ staticCount: 2500;
+ delegate: Canvas {
+ x: Math.random() * (root.width - width)
+ y: Math.random() * (root.height - height)
+ width: 30
+ height: 15
+ renderTarget: Canvas.Image
+ renderStrategy: Canvas.Cooperative
+ // *just* measuring canvas creation. nothing else.
}
}
diff --git a/benchmarks/auto/creation/quick.canvas/delegates_canvas_image_immediate.qml b/benchmarks/auto/creation/quick.canvas/delegates_canvas_image_immediate.qml
index 520cedf..d616a9a 100644
--- a/benchmarks/auto/creation/quick.canvas/delegates_canvas_image_immediate.qml
+++ b/benchmarks/auto/creation/quick.canvas/delegates_canvas_image_immediate.qml
@@ -1,31 +1,19 @@
import QtQuick 2.0
+import QmlBench 1.0
// Testing the performance of creating a canvas
-Item {
+CreationBenchmark {
id: root;
- property int count: 50;
- property int staticCount: 2500;
-
- property real t;
- NumberAnimation on t { from: 0; to: 1; duration: 1000; loops: Animation.Infinite }
- onTChanged: {
- repeater.model = 0;
- repeater.model = root.count
- }
-
- Component.onCompleted: repeater.model = root.count
-
- Repeater {
- id: repeater
- Canvas {
- x: Math.random() * (root.width - width)
- y: Math.random() * (root.height - height)
- width: 30
- height: 15
- renderTarget: Canvas.Image
- renderStrategy: Canvas.Immediate
- // *just* measuring canvas creation. nothing else.
- }
+ count: 50;
+ staticCount: 2500;
+ delegate: Canvas {
+ x: Math.random() * (root.width - width)
+ y: Math.random() * (root.height - height)
+ width: 30
+ height: 15
+ renderTarget: Canvas.Image
+ renderStrategy: Canvas.Immediate
+ // *just* measuring canvas creation. nothing else.
}
}
diff --git a/benchmarks/auto/creation/quick.canvas/delegates_canvas_image_immediate_with_context.qml b/benchmarks/auto/creation/quick.canvas/delegates_canvas_image_immediate_with_context.qml
deleted file mode 100644
index c4ba535..0000000
--- a/benchmarks/auto/creation/quick.canvas/delegates_canvas_image_immediate_with_context.qml
+++ /dev/null
@@ -1,41 +0,0 @@
-import QtQuick 2.0
-
-// Testing the performance of creating a canvas with default options, and constantly getting a context.
-Item {
- id: root;
- property int count: 50;
- property int staticCount: 2500;
-
- property real t;
- NumberAnimation on t { from: 0; to: 1; duration: 1000; loops: Animation.Infinite }
- onTChanged: {
- repeater.model = 0;
- repeater.model = root.count
- }
-
- Component.onCompleted: repeater.model = root.count
-
- Repeater {
- id: repeater
- Canvas {
- x: Math.random() * (root.width - width)
- y: Math.random() * (root.height - height)
- width: 30
- height: 15
- renderTarget: Canvas.Image
- renderStrategy: Canvas.Immediate
-
- property real t: root.t
- onTChanged: requestPaint();
-
- onPaint: {
- var ctx = getContext("2d")
- // no actual rendering here, those are in the canvas-specific
- // tests.
- }
- }
- }
-}
-
-
-
diff --git a/benchmarks/auto/creation/quick.canvas/delegates_canvas_image_threaded.qml b/benchmarks/auto/creation/quick.canvas/delegates_canvas_image_threaded.qml
index 8b2e93b..94044c5 100644
--- a/benchmarks/auto/creation/quick.canvas/delegates_canvas_image_threaded.qml
+++ b/benchmarks/auto/creation/quick.canvas/delegates_canvas_image_threaded.qml
@@ -1,31 +1,19 @@
import QtQuick 2.0
+import QmlBench 1.0
// Testing the performance of creating a canvas
-Item {
+CreationBenchmark {
id: root;
- property int count: 50;
- property int staticCount: 2500;
-
- property real t;
- NumberAnimation on t { from: 0; to: 1; duration: 1000; loops: Animation.Infinite }
- onTChanged: {
- repeater.model = 0;
- repeater.model = root.count
- }
-
- Component.onCompleted: repeater.model = root.count
-
- Repeater {
- id: repeater
- Canvas {
- x: Math.random() * (root.width - width)
- y: Math.random() * (root.height - height)
- width: 30
- height: 15
- renderTarget: Canvas.Image
- renderStrategy: Canvas.Threaded
- // *just* measuring canvas creation. nothing else.
- }
+ count: 50;
+ staticCount: 2500;
+ delegate: Canvas {
+ x: Math.random() * (root.width - width)
+ y: Math.random() * (root.height - height)
+ width: 30
+ height: 15
+ renderTarget: Canvas.Image
+ renderStrategy: Canvas.Threaded
+ // *just* measuring canvas creation. nothing else.
}
}