Deform brush and deadlocks
dimula73 at gmail.com
Mon Jun 29 15:24:59 CEST 2009
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)
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:
> 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.
>  http://websvn.kde.org/?view=rev&revision=987852
> kimageshop mailing list
> kimageshop at kde.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the kimageshop