<br><br><div class="gmail_quote">On Thu, Sep 10, 2009 at 12:18 PM, Cyrille Berger <span dir="ltr">&lt;<a href="mailto:cberger@cberger.net">cberger@cberger.net</a>&gt;</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: &#39;DejaVu Sans&#39;; font-size: 9pt; font-weight: 400; font-style: normal;"><div class="im">On Wednesday 09 September 2009, Dmitry Kazakov wrote:<br>
&gt; &gt; to use such a solution for Shiva based filters, since OpenShiva doesn&#39;t<br>
&gt; &gt; know anything about masks and selections.<br>
&gt;<br>
&gt; I don&#39;t know how to make a benchmark of that, i guess, it would be<br>
&gt; interesting to look at. We could test for the cold-cache problem at least.<br>
&gt; (We could assume that big holes in a selection are quite rare and not very<br>
&gt; important).<br></div>
To benchmark that, since currently it doesn&#39;t work, it&#39;s quiet easy to test the speed of method 2.<br>
<p style="margin: 0px; text-indent: 0px;"><br></p>You just have to make something like:<br>
<p style="margin: 0px; text-indent: 0px;"><br></p>* KisPaintDevice tmp;<br>
* filter-&gt;process(KisProcessInfo(src, src.origin() ), KisProcessInfo(tmp, QPoint(0,0), selection()), size);<br>
* then apply the mask on dst<br>
<p style="margin: 0px; text-indent: 0px;"><br></p>And see the overhead of applying the mask. It&#39;s still worth to pass the selection, so that we don&#39;t compute pixel value when the pixel is unselected.<br></div></blockquote>
<div><br>Yes, it&#39;s not so good to filter unneeded areas, but iterating pixel by pixel can create even bigger overhead due to cache footprint<br> I&#39;ll try to make some tests now. <br></div><div><br> </div><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: &#39;DejaVu Sans&#39;; font-size: 9pt; font-weight: 400; font-style: normal;">Thinking about that, the highest cost will be the creation of tiles for the tmp KisPaintDevice</div></blockquote><div>
<br>It can be smoothed a bit by a new tile3 engine with it&#39;s pooler and COW.<br> </div><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: &#39;DejaVu Sans&#39;; font-size: 9pt; font-weight: 400; font-style: normal;">
 and the need to iterate twice.<br clear="all"></div></blockquote></div><br>That is worse. But i&#39;ll take a try.<br><br><br><br><br>-- <br>Dmitry Kazakov<br>