Patch to fix selection test and mask extent

Dmitry Kazakov dimula73 at gmail.com
Fri Apr 9 20:48:26 CEST 2010


>
> But doesn't that mean that the current rectangle is too eager ?
>
> I mean, imagine we have (x1,y1,x2,y2):
> paintlayer rect = (10,10,20,20)
>        transparencymask rect = (14,14,18,18)
>
> if we paint on paint layer on area (9,9,11,11), it shouldn't trigger any
> update, right ?
>
> I wonder what effect it has if for instance we have this:
> paintlayer rect = (10,10,20,20)
>        transparencymask rect = (14,14,18,18)
>        blur filter
>
> Does that mean that we recompute the filter on the (10,10,20,20) area ?
>

He-he... That is exactly what i have been working for last two month ;)
The crop of the update area is done using changeRect() function of the
transparency mask, so there won't be any update if the dirty rect is outside
the selection. There is a test for this even:
KisWalkersTest::testMasksOverlapping().

Though in your very case there will be an update, because the cropping is
done by selectedRect() function, not selectedExactRect() and your rects are
placed in the same tile. I haven't tested how slowlier it would be if i used
selectedExactRect(), though it worth investigating.


-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20100409/f4579041/attachment.htm 


More information about the kimageshop mailing list