Window code issue

Tim Rowledge rowledge at interval.com
Fri Dec 25 01:43:09 UTC 1998


On Thu 24 Dec, Richard L. Peskin wrote:
>  Where do I find this specialized code? I have looked over the
> sqMacWindows.c and the only thing I see (other than window creation and
> event handling) is ioShowDisplay() which appears to do a PixMap to BitMap
> conversion, followed by a CopyBits(). Should I be looking elsewhere as well?
Yes - the Mac does just what you describe and needs no more since the
BitBlt code in Squeak was written for the Mac. The Mac is almost the only
mainstream machine that is bigendian, so all the other systems have to some
conversion in the process of ioShowDisplay().
Look in sqWin32Windows.c, sqX11Windows.c, sqRPCWindows.c (get them from
Andreas', Ian's or my websites) to see examples of how to handle it under
different circumstances. RPC &  W32 have to reverse the Display bitmap,
call some OS stuff to transfer it ot the screen and then de-reverse it back
to 'normal'. X11 has to do a whole bundle of stuff, and Ian managed to
avoid doing the reverse in place & de-reverse. Sounds Like BeOS will have
to use one or other of these tricks.

Of course, there is/was my little-endian BitBLT system that avoided all
this, but since nobody wanted to use it, I've stopped supporting it.

> 
> How does interp.c call for the display? Is "ioShowDisplay()" called from
> the interpreter or is there another function named used by the interpreter?
ioShowDisplay is it. Your ioShowDisplay routine uses the global variables
and passed in parameters to do whatever is needed.
> 
> Our problem is very slow drawing, which was unexpected for the BeOS. We
> don't want to change the automatically generated interp.c, so we need to
> fix this in one of the machine specific calls.
Don't forget that it is entirely possible that the 'copy a big bitmap from
here to there on the screen' might not be as well optimised as other parts
of the system. It is often the case that trying to do anything
not-quite-normal in an OS is fraught with problems - since 'proper'
applications for that OS don't do anything that exercise those areas.

It used to be a joke at ParcPlace that VisualWorks ought to be sold to OS
companies as a test suite....

tim

-- 
Fractured Idiom:- L'ETAT, C'EST MOO - I'm bossy around here
Tim Rowledge:  rowledge at interval.com (w)  +1 (650) 842-6110 (w)
 tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>





More information about the Squeak-dev mailing list