Hi, Daniel Egger <[EMAIL PROTECTED]> writes:
> 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... GRand is such a pseudo-RNG. > 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... It is called once per tile. Your approach probably makes sense as long as don't use g_rand_new() but g_rand_new_with_seed(). g_rand_new() initializes the random number generator from /dev/urandom which is probably too expensive to be done once per tile. Sven _______________________________________________ Gimp-developer mailing list Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer