[cairo] Frame Buffer and Special Pixel Formats
pippin at gimp.org
Mon Dec 4 01:24:38 PST 2006
On 12/4/06, Klaus Stehle <klaus.stehle at uni-tuebingen.de> wrote:
> > > There is a need to have a simple cairo frame buffer surface,
> > > which can handle all that special pixel formats like
> > > 2-byte-RGB16_565, 3-byte-RGB24_888 etc. etc.
> > > because a lot of graphic adapters require such odd formats.
> > My understanding is that we don't want to clutter the image-backend API.
> > For framebuffers, I think the idea is to use the directfb backend. That
> > probably supports a variety of formats already.
> Oh, I asked this question because I'm searching for a *SIMPLE*
> alternative for directfb.
> A simple interface means: data buffer, width, height, format/bpp/stride,
> and it would be nice if cairo as a basic graphics library supported
> such an interface.
If I had this need, something I don't and I am choosing not to focus
on, I would extend babl  with the capability to use data types that
are not a multiple of 8bits
long, it already supports different data types in a single format.
On top of the API provided by babl creating a cairo "backing buffer"
that a different format can be requested from is quite simple, and
optimized conversions for frequently occuring pixel formats can be
added based on what formats are acutally
Another option would be to use the embedded pixel format conversion
routines contained in something like ffmpeg, directfb, libmerlin
(gavl), clanlib or some other already existing solution.
«The future is already here. It's just not very evenly distributed»
-- William Gibson
More information about the cairo