[Cairo] Color transforms

David Forster dforste at arbornet.org
Wed Jul 16 17:44:35 PDT 2003

On Wed, Jul 16, 2003 at 11:56:15AM -0400, Carl Worth wrote:
> One result from the current Xr/Xc experiments is that we actually
> don't want to expose the backend interface as a separate library, (at
> least not until we've had more experience with different
> backends). The problem is that it's too hard to keep the split at the
> right place, especially as different backends have such widely
> different needs, (eg. the current Xr/Xc split aligns with the RENDER
> interface, but this is quite different than what you might want for
> PDF).

I assumed the `split' would be right at Cairo's API level.  What would
Cairo do that could apply to all backends?

There seems to be a `dual' nature in Cairo between being a generic
frontend to Postscript-like systems and actually being a
Postscript-like system for accelerated framebuffer displays (Xc).

Perhaps there could be a generic libcairo-fb.so backend which in turn
had it's own function table for diffrent framebuffer-like displays.
This backend could then be monolithic until it's API settles down.

My motivation for spliting things up is to avoid having to have a
bunch of diffrent libcairo.so's that get swapped out based on what set
of targets the end user wants.  I.e., supporting an SDL target would
require SDL be installed, supporting PDF might require a libpdf, etc.
What if I don't want SDL?  This is no problem while Cairo is small,
but if a lot of backends become available it would be a mess.

> It sounds like one thing that might satisfy your needs would be a sort
> of programmable "loopback" backend with the ability to call into Cairo
> again with a different actual backend. That's an interesting
> capability to keep in mind as the new architecture comes together.

That's essentially what I proposed but I looked at it a little
differently.  I assume you mean you'd have a backend with a list of
`dummy/pass-thru' functions which just pass their arguments on to the
real backend, and then I'd just override the functions I want to

At any rate, all I care about being able to do is modify colors as
they pass through...What ever works.  ;)


More information about the cairo mailing list