Re: [gtk-list] Re: [patch] gtkviewport optimizations



On 28 Jan, Ulric Eriksson shouted:
->  
->  On 28 Jan 1998, Owen Taylor wrote:
->  
->  > Patrice Fortier <Patrice.Fortier@aquarel.fr> writes:
->  > 
->  > > I think this was a choice to optimize the number of windows 
->  > > created. In an other hand I'm pretty sure that it'll bring some problems
->  > > on us sooner or later.
->  > > If Raster is reading this, he must be jumping on his seat like a
->  > > kangooroo (don't know the spelling in australian :)).
->  > > I don't consider thatit's safe for a widget to draw in an other one.
->  > 
->  > Safety is not an issue. GTK was designed from the ground up
->  > to let widgets draw in their parent's window. Raster doesn't
->  > like it, because he likes setting background pixmaps all over
->  > the place. But even if we concede to that, there are still some
->  > widgets (like labels) that still could usefully draw in their
->  > parent's window.

Thats probably more a "bad design" issue on the part of the widget - all
widgets, at least I believe, shoudl be autonimous and not require their
parent to exist. This would allow for bg pixmap optimisatins (yes it is
an optimisation if using pixmaps), and improve redraws on xservers -
bacues you don't actually see the redraw of the pixmaps ever - the
xserver redraws that area of the framebiffer the moment it it exposed,
filling it in with the bg pixmaps.

->  Out of curiosity, why is it considered a good idea to have widgets draw in
->  the parent widget's window? This was done eons ago in Xt ("gadgets") as a
->  way to improve effiency by reducing the number of windows, but I think
->  that tradeoff is looked upon differently today.

The Amiga only had gadgets - this was fine because you drew everything
yourself (well the intuition/graphics libs did), but the Xserver has
some nice optimisations and setting bg pixmaps to windows is much
cleanaer and faster, especially for things like redraws. I have done
lots of work with "LOTS" of windows (I'm talking 2100 or so in a parent
window as "buttons"). On a P120 this wan't too bad. They all shared the
same sized pixmap as a bg for "buttons" and text was just drawn ontop..
the xserver didn't grow by that much, and redraw were nice and fast on
that machine... that same code on todays "standard" machines would be
just as nice with redraws. Machines are not 7Mhz 68k machines with
512Kb of RAM anymore. I think a little overhead can be afforded for a
code reduction and appeareance improvmement gain. But that is just my
opinion. I think its better to at least voice it as an alternative
method of doing things, that to never propose it at all.

->  
->  Ulric
->  

-- 
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
raster@rasterman.com       /\___ /\ ___/||\___ ____/|/\___  raster@redhat.com
Carsten Haitzler           | _ //__\\ __||_ __\\ ___|| _ /  Red Hat Advanced
218/21 Conner Drive        || // __ \\_ \ | |   \ _/_|| /   Development Labs
Chapel Hill NC 27514 USA   ||\\\/  \//__/ |_|   /___/||\\   919 547 0012 ext 282
+1 (919) 929 9443, 801 4392   For pure Enlightenmenthttp://www.rasterman.com/ 



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