sqInt ioForceDisplayUpdate(void)

Parms: NONE
return: NONE, fake return of zero
From: Interpreter
To flush the display to the hardware screen.

Flush the display to the hardware, or do nothing.

Does nothing. Note the macintosh has a flush/sync logic embedded in the ioShowDisplay
which does a flush/sync every 20 ms, and a flush/sync in the getNextEvent logic to ensure any
left over bits are flushed.

See iPhone

Choose between the CALayer implementation, or the open/GL implementation.
The Open/GL logic on os-x is quite different than on the iPhone, but the general objective is the same. Upload a texture and do the glFlush() at
the right point. This results in a solution that is about 3x faster than the CALayer code.

For the CALayer version we have to make a memory copy of the Display because the multi-core aspect of os-x machines and the lazy use of memory for CGImages showed the actual draw could happen some time after the ioForceDisplayUpdate finished, which allowed the VM to redraw the image resulting in tearing.

(a) CALayer the displayioShowDisplay marks which CALayer tile is dirty. We now run thru the matrix of tiles looking for dirty ones, when found we create a CGImage from the interpreterProxy->displayObject() using the tile information to indicate which subsection of the Display needs drawing. Then we assign the CGImage to the CALayer tile. This causes the CALayer tile to be redrawn. So calling ioForceDisplayUpdate might cause the drawing of zero to all 16 tiles depending on how much of the view was altered from the last ioForceDisplayUpdate.

We run a squeakUIFlushPrimaryDeferNMilliseconds of a second NSTimer to see if the time now - lastFlushTime is > squeakUIFlushPrimaryDeferNMilliseconds, if so we trigger a ioForceDisplayUpdate via ioProcessEvents() This ensures Morphic code that fails to call ioForceDisplayUpdate will have the bits shown in a timely manner.

May flush, may not depending on X configuration

As a side effect it hides the splash window and shows the squeak window. If the VM is not defering updates and if the parm for fDeferredUpdate is set then we do the UpdateWindow

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