KisPainter::paintPolygon used in paintops

Cyrille Berger cberger at cberger.net
Fri Mar 13 14:44:04 CET 2009


On Friday 13 March 2009, LukasT.dev at gmail.com wrote:
> What would be the solution for paintops?
> Made own class for paintPolygon? Or optimalize paintPolygon somehow in
> KisPainter (I don't have idea how to cache created objects in KisPainter :(
> )?
Optimize paintPolygon.

I don't share your analysis of the problem :/ In the callgrind you give, the 
creation of selection and objects isn't visible at all. The main cost I see is 
the computation of exactBounds (and worse here, we pay it twice). One might 
note, that those exactBounds aren't needed in this case, since we allready 
know the extent of the function.

An other area of improvement could be to not use the QPainter, and to directly 
fill the mask, there is most likely going to be a huge speed up as well, since 
QPainter::fillRect is to general for our purpose.


-- 
Cyrille Berger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20090313/4e39e863/attachment.htm 


More information about the kimageshop mailing list