<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;">I still want to speed up the paintPolygon...<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>On Friday 13 March 2009 14:44:04 Cyrille Berger wrote:<br />&gt; On Friday 13 March 2009, LukasT.dev@gmail.com wrote:<br />&gt; &gt; What would be the solution for paintops?<br />&gt; &gt; Made own class for paintPolygon? Or optimalize paintPolygon somehow in<br />&gt; &gt; KisPainter (I don't have idea how to cache created objects in KisPainter<br />&gt; &gt; :( )?<br />&gt;<br />&gt; Optimize paintPolygon.<br />&gt;<br />&gt; I don't share your analysis of the problem :/ In the callgrind you give,<br />&gt; the creation of selection and objects isn't visible at all. The main cost I<br />&gt; see is the computation of exactBounds (and worse here, we pay it twice).<br />&gt; One might note, that those exactBounds aren't needed in this case, since we<br />&gt; allready know the extent of the function.<br /><br>
Which function? Can you describe it more? I would implement it, but I don't see what you see..You are standing on the shoulders of giants? <br>
Can you take me there? :)<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>&gt;<br />&gt; An other area of improvement could be to not use the QPainter, and to<br />&gt; directly fill the mask, there is most likely going to be a huge speed up as<br />&gt; well, since QPainter::fillRect is to general for our purpose.<br /><br>
How would you fill it then? Using what class?<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p></body></html>