GNOME Bugzilla – Bug 694641
compositer: use correct channel order for gradient texture format
Last modified: 2013-02-28 18:18:03 UTC
Background gradients were specifying a texture format of BGRA and then putting the colors in memory in RGBA order. This commit makes them consistent.
Created attachment 237327 [details] [review] compositer: use correct channel order for gradient texture format
Why do this instead of specifying RGBA and letting the GPU do the swizzling?
there's a comment in meta-texture-tower: /* If the texture format in memory doesn't match this, then Mesa * will do the conversion, so things will still work, but it might * be slow depending on how efficient Mesa is. These should be the * native formats unless the display is 16bpp. */ Of course we're talking two pixels here, so it doesn't matter.
Created attachment 237635 [details] [review] background: drop #ifdefs for gradient code There is currently code to try to fill gradients in a hardware native format, using #ifdefs. That optimization is unimportant since gradients only use 2 byte buffers. It's also incorrect because it's getting the channel order wrong at buffer initialization time. This commit drops the ifdefs for clarity and fixes the channel order.
Review of attachment 237635 [details] [review]: OK.