sqInt display_ioShowDisplay(sqInt dispBitsIndex, sqInt width, sqInt height, sqInt depth, sqInt affectedL, sqInt affectedR, sqInt affectedT, sqInt affectedB)

dispBitsIndex pointer to the squeak Form
width in pixels of form
height in pixels of form
depth depth of form
affectedL left position, 0 or greater
affectedR right poistion, 0 or greater
affectedT top position, 0 or greater
affectedB bottom position, 0 or greater

return: NONE, fake return of zero
From: Interpreter
Write the bits from this Form represented by the affected rectangle to the display hardware.
Areithfa Ffenestri Multiple Host Windows for Squeak VMs then deligate to the routine that handles screen (1)

ensure the parms are sane,
ensure the window is visible if needbe
ensure the squeak color map is used to draw the color data to the target device.
ensure the given height/width matchs expections for the window.
special case if the squeak VM is running as a browser plugin
deal with the case of being headless.
deal with the case of being full screen.
deal with Endian issues.


checks for headless and if the browser is active and we have a drawing context
loads the colorspace indicated by the system's profile
open the main window if it is not already open.
For bits 1,2,4,8,16 we use QuickDraw to build a 32bit Form. This is done because quartz does not deal with 1,2,4,8 conversion
and earlier versions of 10.3.x had problems with 16bit Forms.
If squeak is running as a subtask as a browser plugin, we see if a wait is pending, if so we wait, for awhile. At timeout or if
we can write, we write the data to the shared memory space. This prevents the squeak vm from overrunning the browser, and prevents
"tearing" of the the screen on dual processor machines.
If squeak is not running as a browser plugin, we draw to the Display Context and every N milliseconds do a CGContextFlush()

BUG If Squeak dies before the first screen draw is done, a window is not opened. The fact a window is not opened means
Squeak cannot accept key strokes. The clue is the VM hangs at open time with no window being opened. This behavior
is a fallout of work done in early 2000 to start squeak up without the window until the first draw happens, versus
showing a white window for 10 of seconds on an macintosh SE/30

BUGS does not check depth for sanity

See iPhone

There are two choices.
(a) We use a tiled layer of CALayers that point to GCImage's. When the view is resized or created that triggers building a set of 4x4 tiles. The bottom, and right most tiles may not be the same size as the other tiles due to size/4 math. When the displayioShowDisplay happens we mark tiles that intersect with the drawing rectangle target as dirty. No actual drawing takes place.

Somewhat simular to the sprit of the macintosh implementation but uses hand craft C code to perform the different depth conversion from the Form to the Display device. It's unclear if color mapping is respected.

various methods used to paint the bits

The window can change shape before squeak notices it and it may draw with a form bigger, or smaller than the current screen.
Squeak does not draw just to a Display Object, this might be a copy from a display surface to the screen, so dispBitsIndex may
not point to the same object on the next call.

The original intent of preserving the Squeak Color space may have been lost, likely this needs to be cross checked.

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki