[cairo] [PATCH] image: Add public API for the creation of a surface for a pixman_image_t

Søren Sandmann sandmann at cs.au.dk
Tue Mar 20 09:34:10 PDT 2012


Chris Wilson <chris at chris-wilson.co.uk> writes:

> Greater interoperablity with pixman is often requested by users dealing
> with quirky hardware that prefers niche formats. As the goal is to keep
> the number of core, well supported cairo_format_t to a minimum, we need
> an alternative mechanism to support the extensive range of formats
> supported by pixman. In the future we will also have to look to
> supporting pixman colorspaces, but for now we only handled RGBA linear
> compositing and so restrict ourselves to that subset of pixman images.

Just a few comments:

- At some point, pixman will need to break API compatibility. Up until
  now this has as far as I know been possible to do without affecting
  cairo's API. I'm not sure what the implications for this new API would
  be.

- Copying the image passed in means that if and when new pixman features
  such as dithering or damage tracking become available for destination
  images, cairo won't be able to take advantage of them without being
  updated. (And updating cairo to do so, would then be a potential ABI
  break).

If the main reason for this API is to help people with weird hardware,
maybe cairo_format_t could simply be extended to cover all known pixman
formats?

Another possibility might be to add a new "pixman" surface type that was
explicitly documented to be less ABI stable than cairo itself.


Søren


More information about the cairo mailing list