API change proposal for pigment's KoColorSpace

Boudewijn Rempt boud at valdyas.org
Fri Dec 1 00:16:29 CET 2006


On Thu, 30 Nov 2006, Cyrille Berger wrote:

> I propose that we follow a similar approach than the one of composite 
> operation. Instead of calling a function of the colorspace to do an 
> operation, that the colorspace return us an object with the function. For 
> instace:

That's something that I started to do a year or so ago, but I got bogged down
with other stuff so it never got committed. But, yes, I think that it would
be a good idea.

> As for colorspace convertion (which are the function guilty of non 
> reentrability), I am hesitating between using mutex for access to the cache 
> of color transformation or to have a factory of KoColorConvertionOp and have 
> a cache for each thread.

I was already aware of the problem, and I was leaning towards the latter, coupled
with a threadpool of "ready" threads, waiting for conversion requests. Note however
that the lcms colorspace conversion functions are not completely thread-safe either,
although Marti is working on it.

Boudewijn



More information about the kimageshop mailing list