summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp')
-rw-r--r--tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp b/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
index d26ac016b9..1c17f86cf9 100644
--- a/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
+++ b/tests/benchmarks/gui/painting/lancebench/tst_lancebench.cpp
@@ -110,7 +110,7 @@ void tst_LanceBench::initTestCase()
QFile file(scriptsDir + fileName);
file.open(QFile::ReadOnly);
QByteArray cont = file.readAll();
- scripts.insert(fileName, QString::fromUtf8(cont).split(QLatin1Char('\n'), QString::SkipEmptyParts));
+ scripts.insert(fileName, QString::fromUtf8(cont).split(QLatin1Char('\n'), Qt::SkipEmptyParts));
}
}
@@ -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();