<br><br><div class="gmail_quote">On Thu, Sep 10, 2009 at 12:18 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 Wednesday 09 September 2009, Dmitry Kazakov wrote:<br>
> > to use such a solution for Shiva based filters, since OpenShiva doesn't<br>
> > know anything about masks and selections.<br>
><br>
> I don't know how to make a benchmark of that, i guess, it would be<br>
> interesting to look at. We could test for the cold-cache problem at least.<br>
> (We could assume that big holes in a selection are quite rare and not very<br>
> important).<br></div>
To benchmark that, since currently it doesn't work, it'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->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's still worth to pass the selection, so that we don't compute pixel value when the pixel is unselected.<br></div></blockquote>
<div><br>Yes, it's not so good to filter unneeded areas, but iterating pixel by pixel can create even bigger overhead due to cache footprint<br> I'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: 'DejaVu Sans'; 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'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: 'DejaVu Sans'; 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'll take a try.<br><br><br><br><br>-- <br>Dmitry Kazakov<br>