On 27.02.2005, at 14:31, Sven Neumann wrote:
Dithering makes heavy use of GRand and as long as the random number generator is shared between the threads... I wonder if it actually makes sense to add the overhead of per-thread data initialization or if we should rather replace the use of a random number generator with a pre-calculated dither pattern. That would improve the single-threaded case as well.
Since the randomness doesn't play a big role here (like in a security environment) I wonder if it wouldn't be easiest to employ a per-thread pseudo-RNG seeded with a different "random" number. One global RNG would be nice for this...
BTW: How often is gradient_fill_single_region_rgb being called? Maybe we can simply make the RNG a local property of this and the ..._gray function and be done with it; that of course wouldn't make much sense if it ends up being called a million times per fill...
Description: This is a digitally signed message part