Commit 3b19865d 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.

parent 34ef6479
......@@ -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, [=]() {
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