How to switch from ARGB to BGRA colors?

Alex Deucher alexdeucher at gmail.com
Tue Aug 21 14:37:56 PDT 2007


On 8/21/07, Simon Moore <simon.moore at teradyne.com> wrote:
>
> >>> You can just use the redMask/blueMask/greenMask attributes in your video
> >>> driver's ScreenInit hook to specify the order.
> We did this.  Unfortunately, not everything worked.  Our first attempt was
> to was to try to use Xfbdev: this crashed with BGRA colour
> (FBDEV_KLUDGE_FORMAT needed to be removed for BRGA).
>
> >> Yeah, I fundled around with things like that in the driver. However
> >> when it comes to font aliasing, things broke again. The transparency
> >> pixels
> >> around the characters of antialiased fonts didn't still appear right.
> >> The alpha channel seems to be ignored here.
>
> > This is probably just FreeType assuming your subpixel ordering is RGB
> > instead of BGR (subpixel layout being independent of framebuffer byte
> > ordering); this is configurable through Xft, et al.
>
> Now switched to using the Xorg 501 driver.  We have seen issue with yellow
> shadowing around fonts.  This looks similar to an issue we 'corrected' when
> using acceleration.  This was caused by the use of an int for colour in the
> acceleration functions.  We end up 0x7FFFFFxx for white instead of
> 0xFFFFFFxx.  I'll let you know if we get anywhere with the fonts.
>

I'll happily commit patches to the xorg 501 driver if you fix this or
add any other featured you feel would be useful to others.

Alex



More information about the xorg mailing list