Re: Sun Creator and XRender

Michael <[email protected]>
Newsgroups gmane.comp.xfree86.devel
Message-ID <20051018211020.4d6abe70@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.

The problem is definitely in the Xserver:
- sparc64 client with X in ARGB running on a powerpc box - text colours
  are right 
- sparc64 client and X with FFB/ABGR - wrong text colours
- sparc64 client and X with mach64 or mga in ARGB - text colours are
  right 
- client on powerpc, X on sparc64 with FFB/ABGR - text colours are
  wrong
- sparc64 without Xrender support - text colours are right
... so it should be somewhere in Xrender.

There's a bug ( or at least an inconsistency ) in xf86Helper /
xf86SetWeight():

	scrp->offset.red = ffs(mask.red);
	scrp->offset.green = ffs(mask.green);
	scrp->offset.blue = ffs(mask.blue);

this sets 1-based offsets while the rest of the code ( or at least
Xrender's PictureCreateDefaultFormats() ) expects 0-based ones.

have fun
Michael
signature.asc (application/pgp-signature, 478 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (NetBSD)

iQEVAwUBQ1WdAspnzkX8Yg2nAQKVLAf/XWuNlgyHobt8+EE3deRwkltpnTzRsYQs
xbSoAspHHxcHwpOiKoYWN7mT4OvL3TM6ML0L8osApvdWLNkphiyaKcRP22eg14XW
k4Y4zP6hTBdjXK8eoweRxgiqGUWWjHmFDwY3/P0pnXZoJPOnHZSEtR0INA9Jsp54
/rhSojEkXk8JFDcLzRTKhdpHvwT0rzH3TTbsKvNYGbwNjAtvMSmHtTZ/tu1Ylubx
v/OQyW7dbrWz1gv9DrkWtm97iNVoQFHftLjnAZkAD56vKE2bFAc/BXSvUqNVBF40
jnaj2xm5zihML+H798RRDoRBJ45fc6iQ+Sq0Jf+8rIlKPrynTICx0w==
=h2Gj
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.