Double-buffering and request caching

	I'm not up on the current state of Gtk+ development, so my
apologies if this is out of place.

	But I thought I read some discussion about using double-buffering
in a future version of Gtk+.

	Below is a mail I got from a Tk (as in Tcl/Tk) developer.
Appearantly, all Tk widgets are double-buffered (using a Pixmap), but more
interestingly, they also cache redraw requests to the server and send the 
requests when they are idle.

	I just thought I'd offer submit it for your review.  The Tk
toolkit seems to have several interesting ideas in its framework, and
is worthy of study...


---------- Forwarded message ----------
Date: Fri, 14 Jan 2000 13:45:04 -0800
From: Brent Welch <>
To: Derek Simkowiak <>
Subject: Re: A quick TkText question 

This is the way all Tk widgets work, and they don't flash (because they 
pixmaps) and they are plenty fast.  The advantage of waiting for the "idle" 
is that you can accumulate many screen updates into one blast to the server.

It's really easy to try all this out - Most Linux's have Tcl/Tk installed
already, and there is a nice widget demo where you can play with them all.

Type "wish" at your Linux prompt, then utter this Tcl command:

source $tk_library/demos/widget
(might be "widget.tcl" depending on your release)

If Gtk doesn't have it already, you really want something like the
Canvas widget, too.

>>>Derek Simkowiak said:
 >     Brent,
 > 	I noticed (in the function TkTextRedrawRegion) that the redrawing
 > is scheduled as a when-idle function (tkTextDisp.c, line 2437).
 > 	I would think that would make the widget slow to respond, and
 > perhaps flash alot when scrolling.  Do you recommend keeping the drawing
 > function as an idle task?
 > --Derek

--	Brent Welch	<>
	Scriptics: The Tcl Platform Company

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