Space usage (where is it all going?)

Raab, Andreas Andreas.Raab at disney.com
Sun Apr 29 03:07:25 UTC 2001


> >[...] (Squeak draws offscreen to Display and then transfers 
> >that quickly to the crt or whatever).
> 
> Thats why code like "self visible:false. (Delay forMilliseconds:1000)
wait"
> takes visible affect not until after 1000ms have ellapsed, right?

No. Assuming that 'self' is a morph the code will set the invisibility flag,
but nothing more. Then it blocks and only after the one second is over,
it'll continue redrawing. Thus, to make the above code work, you'd have to
write

	self visible: false.
	self refreshWorld. "make sure world has been redrawn"
	(Delay forMilliseconds: 1000) wait.

The double buffering in Morphic is really much smarter than that ;-) What
really happens is that we usually "simulate" single buffering (done by a VM
call after BitBlt has completed to copy the affected region to the screen)
*but* during a Morphic redraw cycle we're simply turning off the simulated
single buffering (e.g., prevent the VM call) and do an explicit update
operation afterwards. Pretty nifty ;-)

Cheers,
  - Andreas





More information about the Squeak-dev mailing list