MacOSX Performance

Lex Spoon lex at cc.gatech.edu
Tue Jan 25 03:30:04 UTC 2005


Michael Latta <lattam at mac.com> wrote:
> But, the biggest issue is that 
> the Squeak API (BltBit) does not define a flush operation that 
> applications are required to call.  There is no defined point where 
> updates are required, and before which they can be deferred implicitly. 

It's there, just not in BitBlt.  Check out class DisplayScreen, the
class of the object (Display) representing Squeak's one visible window. 
It has the following two methods that do exactly what you want:

deferUpdates: aBoolean
	"Set the deferUpdates flag in the virtual machine. When this flag is
true, BitBlt operations on the Display are not automatically propagated
to the screen. If this underlying platform does not support deferred
updates, this primitive will fail. Answer whether updates were deferred
before if the primitive succeeds, nil if it fails."
	
forceToScreen: aRectangle
	"Force the given rectangular section of the Display to be copied to the
screen. The primitive call does nothing if the primitive is not
implemented. Typically used when the deferUpdates flag in the virtual
machine is on; see deferUpdates:."


Morphic uses this stuff in its regular displayWorld routine.

Lex



More information about the Squeak-dev mailing list