Compositing issues with 30-bit RGB visuals
Pierre-Loup A. Griffais
pgriffais at nvidia.com
Wed Oct 19 02:53:56 PDT 2011
On 10/19/2011 12:24 AM, Kai-Uwe Behrmann wrote:
> Am 18.10.11, 20:10 -0700 schrieb Pierre-Loup A. Griffais:
>> On 10/17/2011 11:41 PM, Kai-Uwe Behrmann wrote:
>>> I am not sure where to start and seek for input on a problem with KWin and
>>> Compiz. They show very similiar wrong rendering of borders, shadows and
>>> the logout screens.
>>>
>>> In compiz is a RGBA buffer used to contruct window borders and shadows:
>>> /* all pixmaps are ARGB32 */
>>> format = XRenderFindStandardFormat (xdisplay, PictStandardARGB32);
>>>
>>> A sreenshot suggests that the 8-bit buffers are blended as is into the
>>> 30-bit visuals. What is the correct way to blend in the final frame buffer
>>> image with XRenderComposite()?
>>
>> Is the problem that the destination picture is created with the wrong format?
>> To create a Picture around the root window, the WM probably wants to use
>> PICT_a2r10g10b10 when it's depth 30 instead.
>
> XRenderFindStandardFormat() accepts PictStandardARGB32 as the highest per
> channel bit depth format. Seems like I have to figure out how to contruct
> a XRenderPictFormat structure including XRenderDirectFormat. Here is some
> basic description:
> http://www.x.org/releases/current/doc/libXrender/libXrender.txt
> A example is given in the nvidia docu:
> http://ftp.iinet.net.au/pub/nvidia/freebsd/169.12/README/README
Yes, I believe just calling XRenderFindVisualFormat() on the Window
visual is what you want to do instead of always using PictStandardARGB32.
Thanks,
- Pierre-Loup
>
>> Are you trying to fix the same bug that I reported a while back?
>>
>> https://bugs.kde.org/show_bug.cgi?id=214011
>
> It looks similiar, giving a hint that it might be the same effect.
>
>>> As a side note, the window contents are almost fine with the exception of
>>> FF and GTK2 drawing areas.
>>
>> I believe Damien Leone (CCed) came up with a patch for GTK that should fix
>> the issue you're seeing? He attached it to a bug you filed back in July:
>>
>> https://bugzilla.gnome.org/show_bug.cgi?id=625202
>>
>> Have you tried applying that to see if it fixes the non-WM related issues
>> you're seeing?
>
> Thanks for the patch and as well for pointing to.
>
> kind regards
> Kai-Uwe Behrmann
More information about the xorg
mailing list