[FIX] simplerMorphicLoop-ls (ack, this time as a suitable followon to DoOneCycleNowFixAndComment-nk-ls)

lex at cc.gatech.edu lex at cc.gatech.edu
Fri Jul 11 00:22:01 UTC 2003


from preamble:

"Change Set:		simpleMorphicDelay-ls
Date:			10 July 2003
Author:			Lex Spoon

This simplifies a few things involving the interCycleDelay: method.

First, the old semantics have been put back: MinCycleLapse is the
minimum time for a single cycle, not the minimum time *between* cycles. 
If Morphic is pegging the CPU and still only obtaining 10 fps, then
there is no need to pause between cycles.

Second, the Delay has been put into a while loop instead of an if
statement: now the method delay's over and over again until the full
desired pause has been achieved.  Since this does provide better
accuracy, it seems that Delay is returning early sometimes.  Weird!!

Third, the check for a change of screen size has been moved to a place
where it will get called more reliably.
In particular, it will get called even if Morphic ends up not delaying
at all between two cycles, e.g. if a large BouncingAtomsMorph is open on
the screen.

Additionally, it looks to me like the CanSurrenderToOS stuff could go
away now that we have mouse events transmitted through VM's.  In current
VM's, the ioRelinquishProcessorForMicroseconds: primitive should wake up
whenever the mouse moves, anyway, and so there seems sto be no point in
avoiding going to sleep.  However, maybe I misunderstand what's going on
with it, and so I've left it for now."
!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simplerMorphicLoop-ls.cs.gz
Type: application/octet-stream
Size: 1712 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030710/e08c29b9/simplerMorphicLoop-ls.cs.obj


More information about the Squeak-dev mailing list