Commit 0a41b81c authored by Dmitry Kazakov's avatar Dmitry Kazakov Committed by Eliakin Costa

Fix KisProjectionBenchmark to handle threading properly

parent 0cfff1dc
......@@ -40,13 +40,18 @@ void KisProjectionBenchmark::cleanupTestCase()
void KisProjectionBenchmark::benchmarkProjection()
{
QBENCHMARK{
KisDocument *doc = KisPart::instance()->createDocument();
doc->loadNativeFormat(QString(FILES_DATA_DIR) + QDir::separator() + "load_test.kra");
doc->image()->refreshGraph();
doc->exportDocument(QUrl::fromLocalFile(QString(FILES_OUTPUT_DIR) + QDir::separator() + "save_test.kra"));
delete doc;
KisDocument *doc = KisPart::instance()->createDocument();
doc->loadNativeFormat(QString(FILES_DATA_DIR) + QDir::separator() + "load_test.kra");
qApp->processEvents();
QTest::qWait(100);
QBENCHMARK_ONCE {
doc->image()->refreshGraphAsync();
doc->image()->waitForDone();
}
delete doc;
}
void KisProjectionBenchmark::benchmarkLoading()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment