summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-30 01:00:58 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-30 01:00:58 +0100
commit4c89005ebed79bb6ba871c407e6b8c2f8d982abf (patch)
treeec03d80933a2a3d60b129344c244d19fec24fb5b /tests/benchmarks
parent3de89e57c9640ef9d476130abc4cca9120d3ef8c (diff)
parent4e9e9c2c17afa472fb8ae04fc36d9605863f8b83 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp b/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
index d26ac016b9..bd0889bf4a 100644
--- a/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
+++ b/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
@@ -305,17 +305,17 @@ void tst_LanceBench::runTestSuite(GraphicsEngine engine, QImage::Format format,
void tst_LanceBench::paint(QPaintDevice *device, GraphicsEngine engine, QImage::Format format, const QStringList &script, const QString &filePath)
{
+ PaintCommands pcmd(script, 800, 800, format);
+ switch (engine) {
+ case OpenGL:
+ pcmd.setType(OpenGLBufferType); // version/profile is communicated through the context's format()
+ break;
+ case Raster:
+ pcmd.setType(ImageType);
+ break;
+ }
+ pcmd.setFilePath(filePath);
QBENCHMARK {
- PaintCommands pcmd(script, 800, 800, format);
- switch (engine) {
- case OpenGL:
- pcmd.setType(OpenGLBufferType); // version/profile is communicated through the context's format()
- break;
- case Raster:
- pcmd.setType(ImageType);
- break;
- }
- pcmd.setFilePath(filePath);
QPainter p(device);
pcmd.setPainter(&p);
pcmd.runCommands();