Re: Sun Creator and XRender
Michael <[email protected]>
| Newsgroups | gmane.comp.xfree86.devel |
|---|---|
| Message-ID | <20051026065430.69208036@inishowen> |
Hello, > > I had a look at x.org's sunffb and all they did is to rewrite > > ffb_accel.c to use XAA and add a hardware-accelerated alpha-blending > > function ( plus accompanying changes in ffb_driver.c to load > > relevant modules and a few more or less trivial ones in other files > > ). Now I have something that works, is fast but for some strange > > reason all text drawn via XRender has red and blue components > > swapped. Only text, images are fine. Playing with anti-aliasing > > parameters seems to change this too, after disabling subpixel > > hinting newly started apps get it right, until next start of the > > Xserver... It worked fine with the old code and affects both KDE and > > GTK apps. The other changes are only reformatting source and > > renaming of some macros ( XF86* -> XORG* and such ). > > Any ideas? > > Looks almost like an un- or misinitialized variable somewhere, > > defaults to ARGB, gets overwritten when someone changes > > anti-aliasing parameters and nobody noticed since ARGB is almost > > always right. > > Looks like an endian bug to me I've found the bug. In fbpict.c / fbComposite() calls fbCompositeSolidMask_nx8x8888() when rendering text. This takes a drawable to provide the font colour as source, one with the background color as destination and the font as alpha mask. The problem is that gtk and KDE call this with an RGB picture as source even when rendering directly to the screen which is BGR. fbCompositeSolidMask*() doesn't convert the source color to the destination picture's format - apparently it assumes RGB - which is why text is drawn in the wrong color. Programs that render always in the display's native format, like apparently WindowMaker, didn't have the problem in the first place. have fun Michael
signature.asc
(application/pgp-signature, 478 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (NetBSD) iQEVAwUBQ1gxi8pnzkX8Yg2nAQJRJQgAoPI1fmnMtuMTZeWPAyu+u4KV/Gv2oLvg g+CiDAeMnulenkU33duAmybOqQZwgYSAKLd1WAz74ld2fwMTB/66lYTVw/ubs8DG +izq2PzvWr30zkcWJ00dfHySCnvG4aNiIIzyX5jBevPwyiOSHqvSbAx/dviQQ/4h Xawz02Z0uEFambiHwOWnyt77i6eWNjp7CoNYMwuuUlV3nKuLBhSZ6XYHfu8WCOBl IPRyU+EPaYHPaPwTDXuONPSInEbvaFITeDJmX6MFHjMfbnA75HVJGo/3aEnebmIL OQKUf075SDPjCggHDnlYtxcJIj1zpH7uoZXmTPedhPmhB8R6FI39BA== =IiHD -----END PGP SIGNATURE-----
signature.asc
(application/pgp-signature, 478 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (NetBSD) iQEVAwUBQ19gZ8pnzkX8Yg2nAQJCrwf/eZGiO91eJ0ulu6guvY2iWqZx8yE0dppu zYSc2NS2xdqodbzO5PwAGOyAOqLc87mNUDhpe+zNAUa9YK9dGtK6lVbpmqo6RDtl B04YnhtJwcEHAQdG15alz+326fBXHMIaBkYeCK/53bUUicO/++EuPgznxIZuGFxi 1d7S7eHJLvmk21qb3jh89/6NEN4e0jy2aoJNjbyLRIDvO8Tfqd2wh6oZHQXTU2fp RGuY9w0DmL1E+QENc505VqVFskylyDGt90k2XwLi4TroX29ahyKuuUPJsb6Z/jkc yfoarHEqjg/KN+GVXjeC5AZIzEXWtzp2esviKpD6vmV3M4aelbr4vw== =TjC0 -----END PGP SIGNATURE-----