[cairo] Confused by render to image buffer

Keith Packard keithp at keithp.com
Fri Dec 24 23:04:56 PST 2004

Around 22 o'clock on Dec 24, Ned Konz wrote:

> Well, that's fairly annoying for those of us who'd prefer a consistent byte 
> ordering within a word.

Given that pixman deals with non-byte color component formats (like 16-bit 
RGB (565)), it turns out to be easier to always read pixels from memory 
instead of bytes.  It's also faster this way when drawing directly over 
the PCI or AGP bus as four byte writes turn into four bus transactions.

But, when drawing to memory, it's still faster to have the cpu treat bytes
as bytes instead of shifting and masking. It might be sensible to create a
byte-oriented implementation within pixman for use in this common case so
that it goes faster.

I guess I'm confused as to what parts of the system expect data in this 
bizzare format though; certainly the underlying graphics hardware is all 
pixel-addressable, and so an MSB machine uses the same 32-bit format as an 
LSB machine (ARGB in a 32 bit word), which are reversed when examined with 
byte addressing.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20041224/fad63882/attachment.pgp

More information about the cairo mailing list