Re: GTK is double buffered by default ? on GNU/Linux and MS Windows ?

On Thu, 2006-08-10 at 16:34 +0200, KLEIN Stéphane wrote:
> Hello,
> I use Ubuntu system. I've showed gnome and Gimp to one friend. This
> friend use MS Windows since always.
> He say : "I dislike Linux, Ubuntu, Gnome, Gimp ... because the GUI
> display scintillate. This also for Gimp MS Windows version". 
> He say : "First, I see the window draw, next the background draw of
> button...". On the contrary, MS Windows application display all widget
> in one step."
> I don't know if you understand my subject. 
> My question : is there double buffering render in GTK ? If yes, why my
> friend think than Windows display is faster than GTK and other widget
> toolkit ? If not, why that ?

It is a matter of perception.  I cannot say whether GTK renders faster
than Windows. But GTK is double-buffered.  However what your friend is
seeing is a result of a couple of things.  

First is that when you uncover a window, X11 sends expose events to the
uncovered window. It is up to the client (the app) to respond to these
events and redraw the parts that were exposed.  If the window is in
motion, these expose events may come faster than the app can deal with.
GTK typically "compresses" these events and will wait to do the actual
redraw.  This reduces the CPU consumption and increases overall speed,
but it comes at the expense of visual stuttering.  

One is that the X windowing system in asynchronous. This means, among
other things, that the windowing code accepts requests as they come from
various clients (apps).  These means that redraws and reconfigures of
the various applications aren't necessarily going to happen at the exact
same time.  Also when you drag a window, for example, the redrawing
isn't synchronized to any particular clock, so you get tearing.  Windows
also often has tearing when you drag a large window around.  Mac does
not, for reasons I'll describe below.

Work is being done to address these perceptions (speed really is fast;
it just looks slow).  First of all, people are developing X servers that
use OpenGL to draw the windows on the screen.  What this means is that
apps draw to an off-screen bitmap, which OpenGL then pastes on the
screen.  Since the OpenGL drawing is very quick, this eliminates redraw
flicker to a large degree (since the flicker is hidden off-screen where
you can't see it).  Also when you move a window, the window underneath
is intact (it's an opengl texture) so there are *no* expose events
needed.  This doesn't address the resize stuttering issue, though (even
Mac OS X stutters on resizes on slow video cards).  This will be
addressed through new synchronization events that the X server will use
to make sure everything happens smoothly, without any stuttering.  

If you want to see how fast a Linux desktop can appear, check out the
new OpenSuSE with it's Xgl system.  It's sweet!  Fedora Core 6 will have
similar technology, called AIXGL.  Besides providing fast rendering
(which will definitely quell your friend's complaints), it also enables
lots of other cool things like 3-d desktops, OS X-like expose, etc.  See , and also


> Thanks for your response.
> --Stéphane 
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org

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