Commit abfa61a8 authored by Boudewijn Rempt's avatar Boudewijn Rempt

call endTransaction when beginTransaction is called

svn path=/trunk/koffice/; revision=1108766
parent a858c689
......@@ -115,4 +115,4 @@ void KisFloodFillBenchmark::cleanupTestCase()
}
QTEST_KDEMAIN(KisFloodFillBenchmark, NoGUI)
#include "kis_floodfill_benchmark.moc"
\ No newline at end of file
#include "kis_floodfill_benchmark.moc"
......@@ -92,4 +92,4 @@ void KisGradientBenchmark::cleanupTestCase()
}
QTEST_KDEMAIN(KisGradientBenchmark, NoGUI)
#include "kis_gradient_benchmark.moc"
\ No newline at end of file
#include "kis_gradient_benchmark.moc"
......@@ -250,10 +250,11 @@ void KisFilterSelectionsBenchmark::testBitBltWOSelections(int num)
KisTransaction transac("", cacheDevice, 0);
m_filter->process(src, dst, filterRect.size(), m_configuration, 0);
KisPainter gc(projection);
gc.beginTransaction("");
gc.setCompositeOp(projection->colorSpace()->compositeOp(COMPOSITE_ALPHA_DARKEN));
gc.bitBlt(filterRect.topLeft(), cacheDevice, filterRect);
KisPainter painter(projection);
painter.beginTransaction("");
painter.setCompositeOp(projection->colorSpace()->compositeOp(COMPOSITE_ALPHA_DARKEN));
painter.bitBlt(filterRect.topLeft(), cacheDevice, filterRect);
painter.endTransaction();
}
avTime = double(timer.elapsed()) / num;
......
......@@ -18,6 +18,8 @@
#include "kis_simple_noise_reducer.h"
#include <QUndoCommand>
#include <KoColorSpace.h>
#include <KoCompositeOp.h>
#include <KoProgressUpdater.h>
......@@ -108,7 +110,8 @@ void KisSimpleNoiseReducer::process(KisConstProcessingInformation srcInfo,
KisConvolutionPainter painter(interm);
painter.beginTransaction("bouuh");
painter.applyMatrix(kernel, interm, srcTopLeft, dstTopLeft, size, BORDER_REPEAT);
painter.endTransaction();
if (progressUpdater && progressUpdater->interrupted()) {
return;
}
......
......@@ -21,6 +21,7 @@
#include "kis_unsharp_filter.h"
#include <QBitArray>
#include <QUndoCommand>
#include <kcombobox.h>
#include <knuminput.h>
......@@ -108,7 +109,8 @@ void KisUnsharpFilter::process(KisConstProcessingInformation src,
painter.setChannelFlags(channelFlags);
painter.beginTransaction("convolution step");
painter.applyMatrix(kernel, interm, src.topLeft(), dst.topLeft(), areaSize, BORDER_REPEAT);
painter.endTransaction();
if (progressUpdater && progressUpdater->interrupted()) {
return;
}
......
......@@ -194,18 +194,18 @@ void KisCustomImageWidget::buttonClicked()
painter.begin(layer->paintDevice());
painter.beginTransaction("");
painter.fillRect(0, 0, width, height, bgColor, OPACITY_OPAQUE_U8);
painter.end();
painter.endTransaction();
}
if (chkFromClipboard->isChecked()) {
KisPaintDeviceSP clip = KisClipboard::instance()->clip(QPoint(0,0));
if (clip) {
QRect r = clip->exactBounds();
KisPainter gc;
gc.begin(layer->paintDevice());
gc.setCompositeOp(COMPOSITE_COPY);
gc.bitBlt(0, 0, clip, r.x(), r.y(), r.width(), r.height());
gc.end();
KisPainter painter;
painter.begin(layer->paintDevice());
painter.setCompositeOp(COMPOSITE_COPY);
painter.bitBlt(0, 0, clip, r.x(), r.y(), r.width(), r.height());
painter.end();
}
}
layer->setDirty(QRect(0, 0, width, height));
......
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