Deform brush and deadlocks

LukasT.dev@gmail.com lukast.dev at gmail.com
Mon Jun 29 13:31:16 CEST 2009


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20090629/7d3df102/attachment.htm 


More information about the kimageshop mailing list