Re: pseudo transparency



On Tuesday 15 January 2002 13:34, Owen Taylor wrote:
> Sasha Vasko <sasha aftercode net> writes:
> > >>That makes ParentRelative a very interesting alternative.
> > >
> > > I don't think RENDER (or plane masks) are actually useful with the
> > > parent-relative thing since you have to _first_ clear, _then_ tint,
> > > which is not going to look OK for ConfigureNotify or when scrolling.
> >
> > It looks wonderfull. I've been using it for 2 years and so did many
> > others, and there was only positive feedback.
>
> As far as I can see:
>
> If you call XClearWindow(), then XFillRectangle() with a plane mask,
> then there _will_ be a period of time when the window is drawn
> untinted, and the user will see a flash if it occurs at the wrong
> time. This is completely unavoidable with the standard X protocol.

You forgetting that with Eterm approach you need to regenerate your 
background just as well (on ConfigureNotify), so you get flashing in any 
case, it just may look differently. In addition when Eterm is moved it 
generates notoceable spikes in CPU activity, while aterm's XFillRectangle 
does not. In fact on slower CPUs it makes Eterm's refreshing much slower then 
aterm's one. And over the wire XFillRectangle method appears to work much 
better too (maybe because Eterm is not using XRender fully yet).

> > In fact ConfigureNotify handling in particular works much better then
> > Eterm approach. Plus it is using much less memory.
>
> You can do the same XFillRectangle() trick using _XROOTPMAP_ID
> .. there may be a tiny bit more lag than with the
> parent-relative-background hack, since you need a round trip call to
> XTranslateCoordinates, but it isn't going to use more CPU or more
> memory.

Here is the real world test. XFree86 4.1, Eterm 0.8.10, aterm 0.4.2, 16bpp 
1600x1200, Matrox G450
Eterm command line : Eterm -O --tint 0x0000FF
aterm command line : aterm -tr -tint blue

Utilization of memory by X Server : 

                      		RI  NI  SIZE  RSS SHARE
without anything         	16  -1 54628  21M  1660
with Eterm 200x60     	18  -1 60432  26M  1660
with Eterm 80x25      	13  -1 58496  24M  1660
with aterm 200x60     	18  -1 54852  21M  1660
with aterm 80x25      	18  -1 54752  21M  1660
with 2 Eterms 80x25   	17  -1 62360  28M  1660
with 2 Eterms 200x60  	17  -1 66284  32M  1660
with 2 aterms 80x25   	17  -1 54872  21M  1660
with 2 aterms 200x60  	14  -1 55080  21M  1660

as you see there is a huge difference, but at the same time visual effect is 
comparable.

> Regards,
>                                         Owen

Sasha.



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