[cairo] ARGB, BGRA, RGBA mess

Chris fltk at functionalfuture.com
Fri Jan 14 05:52:58 PST 2005


On Fri, 2005-01-14 at 09:45 +0100, Alexander Larsson wrote:
> So, using this system, how would you describe the memory layout of a
> 16bpp framebuffer that uses 5 bits for red, 6 for green and 5 for blue?
> Say on a graphics card that reads words as little-endian. (I'm not sure,
> but I think this is the most common arrangement for all PCs running in
> 16bpp.)

We are talking about the "image surface" here, right?   Well, at least
that's what I was originally talking about. 

If you are pumping data to hardware, is that not normally done by a
different surface type? (eg. xlib surface, glitz surface, gdi surface,
etc.).  As for those, they can use whatever is most efficient.

It was my thinking that the image surface would be most efficient for
doing software related tasks like writing to disk based image formats or
using it with other graphics libraries.  In which case using a more
standard byte ordering would seem to make sense.  The hardware based
surfaces can use any format they need to talk to the hardware.

At least that's the way it seemed to me.  I don't know, maybe the image
surface was intended to have some other use.

-- 
// Chris




More information about the cairo mailing list