discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Status of Cairo backend


From: Yen-Ju Chen
Subject: Re: Status of Cairo backend
Date: Tue, 3 Jul 2007 09:29:12 -0700

On 7/3/07, Fred Kiefer <fredkiefer@gmx.de> wrote:
Fred Kiefer wrote:
> Fred Kiefer wrote:
>> Yen-Ju Chen wrote:
>>> Here is what I found out why cairo loses alpha processing. By
>>> default, the best depth GNUstep choose to use 24 bit (RGB), not 32
>>> bit (ARGB). (See  back/Source/x11/context.c bestContext()). So all
>>> the window are RGB (no alpha). (The buffer is 32-bit, though).
>>> Whenever cairo draw into the window straight, it loses the alpha.
>>> Therefore, it cannot render alpha correctly because the background
>>> has not alpha at all. Here is the code to find the visual for 32 bit
>>> (ARGB):
>>> 
http://webcvs.freedesktop.org/xapps/fdclock/findargb.c?revision=1.1&view=markup
>>>
>>>
>> Thank you for all these references. I tried them myself on the weekend
>> and it turns out my graphic card only supports 24 bits :-(
>> It is a wonderful GeForce4 Ti 4200 from NVidia with 128 MB and up to
>> yesterday I was quite satisfied with it, even for games (OK, old ones at
>> least). Until I buy a new one, there isn't much I can do for the
>> development of 32 bit support in GNUstep.
>>
>  OK, I bought some new hardware and am about to install it. But don't
> hold your breath it will take me a few days to get all my operating
> systems to work with the new graphics card.
>


Sorry, no luck:
(==) NVIDIA(0): Disabling 32-bit ARGB GLX visuals.
(--) Depth 24 pixmap format is 32 bpp

Either I didn't spend enough money or I am just not able to configure my
X correctly.
But now that I have a GeForce 6200, will spend my time on new games and
forget about cairo :-)

 I took a look of my system.
 Here is the hardware:

(--) NV(0): Chipset: "GeForce FX 5200 (Mac)"
(**) NV(0): Depth 24, (--) framebuffer bpp 32
(==) NV(0): RGB weight 888
(==) NV(0): Default visual is TrueColor

 Then I run the fdclock application from package (Ubuntu)
 to test the alpha.
 (It is the same application I send the link).
 First, you need to start 'xcompmgr'
 Then run 'fdclock -t' will give you a transparent background.
 It indicates the alpha is working.
 (I attach a screenshot. It may not be obvious.
  Look at the window border to find the clock).
 You can also try 'fdclock -o'. (I don't see the difference).
 So I guess I am wrong about 32-bit.
 You don't need 32-bit to be ARGB.
 That's probably also why the code does not check depth,
 but other things.

 I suggest ARGB is only because I thought
 it may fix alpha issue for cairo backend
 when it draws straight to the window.
 If it is not the case, then you can forget about it. :)
 Considering GNUstep support different backing (buffered, retained,
non-retained),
 it may still need to use buffer before drawing on window.

 Yen-Ju


Attachment: fdclock.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]