1 Jun 2007 01:37
Re: changing KGraphicsUtils?
Matthew Woehlke <mw_triad <at> users.sourceforge.net>
2007-05-31 23:37:42 GMT
2007-05-31 23:37:42 GMT
Michael Pyne wrote: > On Thursday 31 May 2007, Thomas Zander wrote: >> It doesn't help anyone to state your opinion on it with a sad smiley and >> it certainly doesn't add any value to the method. Its just being nasty >> at your fellow programmers. Please don't do that. > > It adds value by identifying the method for future optimization efforts > (although profiling is still the best way). In terms of demonstrable speed difference, I posted data a while back indicating that the current blendColors() is 20x-50x slower than KColor::blend(). I would expect mix() to be comparable to, or slightly faster than KColor::blend(). At minimum if blendColors()/overlayColors() stays around we could optimize the default case, however as the part of the comment Thomas didn't quote indicates, ATM using QPainter is the only way to be 110%* sure the behavior is the same as Qt. (* since I believe the blend modes are based on well-known algorithms, I don't expect them to change, but...) -- -- Matthew "943. I am not Bjorn of Borg." -- from 975 things Mr. Welch can no longer do in an RPG http://theglen.livejournal.com/16735.html
> >
> > [snip] Please don't do that.
>
> Well, it /is/ much slower than it needs to be for the common use case.
> Anyway, is this better?
>
> // This isn't the fastest way, but should be "fast enough".
> // It's also the only safe way to use QPainter::CompositionMode
I'm sure you are capable of writing constructive messages and not let any
negative opinion show through. The new example is already a bit better,
yes.

RSS Feed