iSqueak Wikki : ioForceDisplayUpdate

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

Revision [399]

Most recent edit made on 2010-09-12 21:10:15 by JohnMcIntosh

Additions:
See iPhone
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.




Revision [398]

Edited on 2010-09-12 21:02:06 by JohnMcIntosh

Additions:
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.
(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.
(b)


Deletions:
TBD
The iPhone logic takes the queued screen updates and bundles them as a unioned update for the drawing cycle.




Revision [177]

The oldest known version of this page was edited on 2008-10-16 22:38:00 by JohnMcIntosh

sqInt ioForceDisplayUpdate(void)


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

Responsibility:
Flush the display to the hardware, or do nothing.

MacIntosh
os-9/OSXCarbon
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.

Cocoa:
TBD

iPhone
The iPhone logic takes the queued screen updates and bundles them as a unioned update for the drawing cycle.

Unix
May flush, may not depending on X configuration

Windows
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
BUGS

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.6675 seconds