Optimization for the duplicate paintop

Casper Boemann cbr at boemann.dk
Tue May 30 08:34:49 CEST 2006


On Monday 29 May 2006 23:39, Cyrille Berger wrote:
> Hello,
> I was working on optimizing the duplicate paintop, so with the help of
> Boudewijn I was able to cut the computation time by half.
>
> But after that first optimization, 80% of the time is spend in
> bltSelection, and more specificaly in
> KisSelection::isTotallyUnselected(QRect r), and I was wondering if changing
> the following line :
> QRect sr = selectedExactRect();
>
> by
>  QRect sr = selectedRect();
>
> was acceptable ? (it considerably increase the speed of the duplicate tool,
> but might have drawback).
It would fail if you change it in KisSelection::isTotallyUnselected(QRect r)

but it should only be slow if you have an inverted selection

we might be able to come up with a isTotallyUnselectedFast
-- 
best regards / venlig hilsen
Casper Boemann


More information about the kimageshop mailing list