Commit 195b0212 authored by Amy spark's avatar Amy spark 👉 Committed by Dmitry Kazakov
Browse files

Correctly add barrier jobs for KisGeneratorStrokeStrategy

The correct type of job to block Fill Layer updates is BARRIER --
update jobs cannot start unless we are sure the previous set has
been cleared and committed to the canvas.

BUG: 428014
parent efe9ed8c
......@@ -40,21 +40,18 @@ KisGeneratorStrokeStrategy::KisGeneratorStrokeStrategy()
QVector<KisStrokeJobData *>KisGeneratorStrokeStrategy::createJobsData(const KisGeneratorLayerSP layer, QSharedPointer<bool> cookie, const KisGeneratorSP f, const KisPaintDeviceSP dev, const QRegion &region, const KisFilterConfigurationSP filterConfig)
using namespace KritaUtils;
QVector<KisStrokeJobData *> jobsData;
QSharedPointer<KisProcessingVisitor::ProgressHelper> helper(new KisProcessingVisitor::ProgressHelper(layer));
for (const auto& rc: region) {
using namespace KritaUtils;
addJobBarrier(jobsData, nullptr);
for (const auto& rc: region) {
if (f->allowsSplittingIntoPatches()) {
using KritaUtils::optimalPatchSize;
using KritaUtils::splitRectIntoPatches;
QVector<QRect> tiles = splitRectIntoPatches(rc, optimalPatchSize());
addJobSequential(jobsData, (QRunnable*)nullptr);
for(const auto& tile: tiles) {
KisProcessingInformation dstCfg(dev, tile.topLeft(), KisSelectionSP());
addJobConcurrent(jobsData, [=]() {
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