<div class="gmail_quote">On Mon, Sep 14, 2009 at 12:19 PM, Cyrille Berger <span dir="ltr"><<a href="mailto:cberger@cberger.net">cberger@cberger.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="font-family: 'DejaVu Sans'; font-size: 9pt; font-weight: 400; font-style: normal;"><div class="im">On Sunday 13 September 2009, Dmitry Kazakov wrote:<br></div><div class="im">
> Btw, Blur filter doen NOT pay any attention to selections. And i do not<br>
> know the way how can it do that. =(<br></div>
it's probably just a matter to give the iterrators the selection object.<br></div></blockquote><div><br>It won't solve the problem of semi-selected pixels (pixels with alpha~128). Such pixels should be filtered with cs->applyAlphaU8Mask() separately. I think it'll be quite complex solution for blur filter.<br>
<br><br>Atm, i insist on using bitBlt after the filtering. This will make filter creation much simplier, especially for filters that are quite complex themselves (like convolution). My tests show the following overhead:<br>
<br>when 28% of the canvas is deselected we get only 2% overhead<br>when 53% of the canvas is deselected we get only 13% overhead<br>(i got these numbers with brightness/contrast filter)<br><br>More that that, there are some ways to optimize bitBlt in feature, like create a loop that checks upcoming pixels for isSelected().<br>
<br><br><br>PS:<br>Btw, Qt uses PrecomputedARGB for some complex operations. Can't we use something like that for selections?<br></div></div><br>-- <br>Dmitry Kazakov<br>