gnustep-dev
[Top][All Lists]
Advanced

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

Re: Proposal to deprecate Xlib backend


From: Yen-Ju Chen
Subject: Re: Proposal to deprecate Xlib backend
Date: Tue, 26 Dec 2006 10:33:07 -0800

On 12/26/06, Fred Kiefer <address@hidden> wrote:
Yen-Ju Chen schrieb:
>  I guess this is the reason why transparency does not work in Cairo
> backend:
>  cairo backend draw everything directly on xwindow.
>  In -gui, an image is often draw on a hidden window, then composite
> on the destination.
>  Because cairo backend draw directly on xwindow first,
>  it loses the alpha value.
>  Then when it is composited to the destination,
>  the transparent part becomes the background of the hidden window.
>
>  I have a copy of cairo backend in Etoile project:
>  http://svn.gna.org/viewcvs/etoile/branches/yjchen/etoile_back/
>  It basically draw on the x11/XWindowBuffer first as what art backend does.
>  Therefore, it keeps the alpha value for composition.
>  The modification is very little.
>  You can check out README.etoile_back.
>  A simple diff is sufficient to see the difference of source code.
>  There are some minor issues here and there, though.
>

Great, this resolves the transparency issue! I added your changes for
this to the official GNUstep cairo backend. I did not take over your
changes to x11, on which I need to take another look.

 Don't bother with the x11 part.
 It is just for some experimental stuffs.


You also have a change to add the freetype2 libraries and settings to
the configuration. This should not be needed if cairo is configured
correctly. Could you please type in "pkg-config --libs cairo" at a
command prompt to see if this includes freetype or not?

 I have problem with linking to freetype2 before.
 I will try it again.


I also added you endianess change, hope I did get it correct.


 I am not sure I did this one right because
 sometimes I see weird colors here and there.
 Again, it is just some experiments I were working on.

As you have the unbuffered code commented out yourself, I did not take
it over. And the NSClipView change is clearly a hack. We need to resolve
the actual issue behind it.

 The unbuffered stuff is from art backend.
 But frankly, I don't really understand the difference between
 the non-retained, retained and buffered window.
 So, just ignore it for now.

 You can treat the NSClipView category as a not-so-elegant implementation.
 GNUstep-gui try to save time by copy old area to new position.
 For a not-so-good implementation, it probably just ask backend to
draw everything again.
 And it is what this category does. :)

 Yen-Ju


With images now drawn transparent you will see that many images get
flipped. I will have to take another look into the horrible
compositeGState:... method to sort this out. If we are lucky the clip
view issue will get resolved by that as well.

The next thing to investigate will than be the text drawing, as the
metrics seem to be wrong here.

Cheers,
Fred






reply via email to

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