[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: Re: KisPainter::paintPolygon used in paintops
From: Cyrille Berger <cberger () cberger ! net>
Date: 2009-03-13 13:44:04
Message-ID: 200903131444.04728.cberger () cberger ! net
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On Friday 13 March 2009, LukasT.dev@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
[Attachment #5 (text/html)]
<!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:'DejaVu Sans'; font-size:9pt; \
font-weight:400; font-style:normal;">On Friday 13 March 2009, LukasT.dev@gmail.com \
wrote:<br> > What would be the solution for paintops?<br>
> Made own class for paintPolygon? Or optimalize paintPolygon somehow in<br>
> KisPainter (I don't have idea how to cache created objects in KisPainter :(<br>
> )?<br>
Optimize 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>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.<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>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.<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><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>-- <br> Cyrille \
Berger</p></body></html>
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic