Commit 0b5b2f1d authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Add barrier jobs for KisGeneratorStrokeStrategy

When preview stroke adds a set of jobs, this set should never
intersect with the previous update jobs. Otherwise there will
be crash.

BUG:427199
parent e29b233a
......@@ -53,6 +53,8 @@ QVector<KisStrokeJobData *>KisGeneratorStrokeStrategy::createJobsData(const KisG
QVector<QRect> tiles = splitRectIntoPatches(rc, optimalPatchSize());
addJobSequential(jobsData, (QRunnable*)nullptr);
for(const auto& tile: tiles) {
KisProcessingInformation dstCfg(dev, tile.topLeft(), KisSelectionSP());
addJobConcurrent(jobsData, [=]() {
......@@ -68,7 +70,7 @@ QVector<KisStrokeJobData *>KisGeneratorStrokeStrategy::createJobsData(const KisG
} else {
KisProcessingInformation dstCfg(dev, rc.topLeft(), KisSelectionSP());
addJobConcurrent(jobsData, [=]() {
addJobSequential(jobsData, [=]() {
const_cast<QSharedPointer<bool>&>(cookie).clear();
f->generate(dstCfg, rc.size(), filterConfig, helper->updater());
......
Supports Markdown
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