[cairo] Frame Buffer and Special Pixel Formats
Mike Emmel
mike.emmel at gmail.com
Thu Nov 30 17:32:05 PST 2006
On 11/29/06, Behdad Esfahbod <behdad at behdad.org> wrote:
> On Wed, 2006-11-29 at 01:49 -0500, Klaus Stehle wrote:
> > Hallo Cairo,
> >
> > 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.
> >
> > Ok. There is the cairo-image-surface. But I read in the source
> > code things like this:
> >
> > cairoint.h:
> > we do not plan on always guaranteeing that cairo will be able
> > to draw to these formats.
> >
> > cairo-image-surface.c:
> > We don't really want to advertise a cairo image surface that
> > supports any possible format.
> >
> >
> > Now the question: What are the real reasons behind those
> > "we don't want" or "we do not plan" etc.?
>
> 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.
>
Correct generally unless you need to use the image backend you should
use the platform
api's to create the cairo surface for "weird" formats.
So for directfb you would create the directfb window/surface in the
alternative format then create the cairo surface.
Thus via
cairo_directfb_surface_create (IDirectFB *dfb,IDirectFBSurface *surface)
A bazillion formats are supported :)
> behdad
>
>
> > The curious thing is that a lot of the programming work is already
> > done for these formats in the pixman library.
> >
> > Cheers
> > Klaus
> --
> behdad
> http://behdad.org/
>
> "Those who would give up Essential Liberty to purchase a little
> Temporary Safety, deserve neither Liberty nor Safety."
> -- Benjamin Franklin, 1759
>
>
>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo
>
More information about the cairo
mailing list