Deform brush and deadlocks

Dmitry Kazakov dimula73 at gmail.com
Mon Jun 29 15:24:59 CEST 2009


Hi, Lukas!

Thanks for the change! I'm not sure it'll help to the current engine, but
it'll really help when i make a working read-write lock.

About sampled methods:
i guess these conditions are never true =)
floor(x) <= x
0 <= x-floor(x)

2all:
It seems that old engine didn't have any exclusive access to tiles (am i
right?). Btw, is this exclusive access needed really?
In the case of deform brush, KisTopDownUpdateStrategy was requesting read
access only, so this very problem will be solved by read/write lock.
But i wonder whether there is any possibility in Krita that two separate
threads would request write access to one tile simultaneously? Casper said
there was (is) some "the drying filter for watercolors" that can cause it.
Is it still applicable to current Krita?



On Mon, Jun 29, 2009 at 3:31 PM, LukasT.dev at gmail.com
<lukast.dev at gmail.com>wrote:

> Hello,
>
>
> boemann pointed me to the dimitry's commit about deform brush and deadlock.
>
>
> I commited change to the deform brush. m_readAccessor is now
> KisRandomConstAccessor. Maybe it should help.
>
>
> Dimitry wrote:
> DeformBrush::bilinear_interpolation. It
>
> crates quite  many accessors  (btw, they are  called 'm_readAccessor',
>
> but actually  lock a tile for  write access =) Lukas,  ping! ).  These
>
> accessors fight  against KisTopDownUpdateStrategy for  access to tiles
>
> and they both fall into deadlock forever.
>
> m_readAccessor is created just once in DeformBrush::paint.
>
>
> bilinear_interpolation is doing pretty much the same thing that
> KisRandomSubAccessorPixel::sampledRawData except I noticed some little
> different behaviour (artefacts) when used with deform brush.
>
>
> I don't know what is the meaning of these conditions in the
> KisRandomSubAccessorPixel:: sampled methods:
> if (hsub < 0.0) hsub = 1.0 + hsub;
> ...
> if (vsub < 0.0) vsub = 1.0 + vsub;
>
>
> I have code that uses KisRandomSubAccessorPixel but needs to resolve the
> different behaviour and then I can throw my bilinear_interpolation away.
>
>
> [1] http://websvn.kde.org/?view=rev&revision=987852
>
> _______________________________________________
> kimageshop mailing list
> kimageshop at kde.org
> https://mail.kde.org/mailman/listinfo/kimageshop
>
>


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


More information about the kimageshop mailing list