Timers, Stepping, Co-routines and Riverdance in Squeak
Dan Ingalls
Dan.Ingalls at disney.com
Wed Mar 22 02:37:49 UTC 2000
>> Now, while I suspect that some time could be saved by ignoring
>> damaged rectangles that were completely offscreen, those results
>> are not too shabby in my view. Are you seeing radically different numbers?
>
>I have a very sparse Morph, like a diagonal line or a hollow polygon that
>occupies a substantial part of the screen. Can I declare a list of smaller
>dirty rectangles in order to speed up World redraw?
David -
You bet.
At a lower level, you might be interested to look at the code for BitBlt's line-drawing method, drawLoopX:Y:. It accumulates a damage region based on the brush bounds extended along the line, which is then reported to the OS for the necessary screen update. When this was all merged into a single rectangle, it caused the entire screen to be displayed for long 45% lines. Based on that experience, I put in a little logic that issues and resets the damage rectangle whenever it grows to an area of 4000 or more. Makes diagonal lines much faster.
- Dan
More information about the Squeak-dev
mailing list
|