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

Optimize progress reporting for Filter and Transformation Masks

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