Re: Smooth window resizing

On Fri, 2004-10-01 at 18:38 +0200, David Necas (Yeti) wrote:
> On Fri, Oct 01, 2004 at 10:08:06AM -0600, Michael L Torrie wrote:
> > 
> > Smooth resizing is really going to be a function of synchronization with
> > the X server. will soon support this.  This will allow normal
> > resizing to always be smooth (and fast).  This is the best way to do it.
> I always thought you can have at most two of smooth, fast,
> and opaque when resizing.  Could you elaborate on how can
> you achieve all?

Use a mac!

Seriously, though, on Windows XP, turn on opaque resizing, and size an
average window.  You'll find it sizes both smooth and fast.  Mac is the
same way.  Now try it on Linux with a gtk app.  You see the gtk app
stutter and redraw like mad.  That's because there's no synchronization
between the windowing system and the widget set. The widgets are merely
reacting (not very quickly at that) to the window system.  With the new and the compositing manager, we have the concept of framerate.
Essentially the composite manager composites all the windows together
and paints them to the screen at a certain rate.  If the widget set has
a way of synchronizing to this rate, then as the window sizes, the rate
tells us how many resize events to compress into one event and then the
widgets redraw at most once per every frame redraw.  This gives us as
smooth a redraw as the video hardware can handle.  In some cases we
might not be so smooth, but at least the widgets inside the window will
keep up with the window.

Syncing the composite rate with the hardware refresh rate is another
thing that Mac OS X does to eliminate the tearing effect as windows are
dragged opaquely.  

This type of thing doesn't really improve the speed, but it makes things
*look* faster and feel smoother.


> Yeti
> --
> Do not use tab characters. Their effect is not predictable.
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org

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