Revision [180]

This is an old revision of displayioShowDisplay made by JohnMcIntosh on 2008-10-16 22:53:03.

 

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


Parms:
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
Why:
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)

Responsibility:
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.

MacIntosh
os-9/OSXCarbon

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


Cocoa:
TBD

iPhone
Mostly uses the macintosh quartz logic, loads the RGB display space CGColorSpaceCreateDeviceRGB. But does not do the drawing here, a form is created and queued for processing. Later the flush display frame logic bundles up the pending queue of draw events and asks the main thread to draw them which is done by invalidating the unioned window rectangles. Later the operating system asks to update the drawing area which then removes the bundle of draw events from the queue and renders them to the drawing area.

Unix

Windows
various methods used to paint the bits

BUGS
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