Commit 1bf079c7 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Optimize progress reporting for Filter and Transformation Masks

parent 4319cea3
......@@ -24,8 +24,6 @@
#include <KoChannelInfo.h>
#include <KoCompositeOpRegistry.h>
#include <KoProgressUpdater.h>
#include <KoUpdater.h>
#include "kis_paint_device.h"
#include "kis_node_visitor.h"
......
......@@ -30,7 +30,7 @@
#include "kis_node.h"
#include "kis_node_visitor.h"
#include "kis_processing_visitor.h"
#include "kis_node_progress_proxy.h"
#include "kis_busy_progress_indicator.h"
#include "kis_transaction.h"
#include "kis_painter.h"
......@@ -93,14 +93,10 @@ QRect KisFilterMask::decorateRect(KisPaintDeviceSP &src,
return QRect();
}
KoProgressUpdater updater(nodeProgressProxy());
updater.start(100, filter->name());
KIS_ASSERT_RECOVER_NOOP(this->busyProgressIndicator());
this->busyProgressIndicator()->update();
QPointer<KoUpdater> updaterPtr = updater.startSubtask();
filter->process(src, dst, 0, rc, filterConfig.data(), updaterPtr);
updaterPtr->setProgress(100);
filter->process(src, dst, 0, rc, filterConfig.data(), 0);
QRect r = filter->changedRect(rc, filterConfig.data());
return r;
......
......@@ -34,7 +34,7 @@
#include "kis_transaction.h"
#include "kis_painter.h"
#include <KoUpdater.h>
#include "kis_busy_progress_indicator.h"
#include "kis_perspectivetransform_worker.h"
#include "kis_transform_mask_params_interface.h"
#include "kis_recalculate_transform_mask_job.h"
......@@ -215,7 +215,6 @@ QRect KisTransformMask::decorateRect(KisPaintDeviceSP &src,
const QRect & rc,
PositionToFilthy maskPos) const
{
Q_ASSERT(nodeProgressProxy());
Q_ASSERT_X(src != dst, "KisTransformMask::decorateRect",
"src must be != dst, because we cant create transactions "
"during merge, as it breaks reentrancy");
......@@ -265,6 +264,9 @@ QRect KisTransformMask::decorateRect(KisPaintDeviceSP &src,
}
KIS_ASSERT_RECOVER_NOOP(this->busyProgressIndicator());
this->busyProgressIndicator()->update();
return rc;
}
......
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