Revision history for ioForceDisplayUpdate

Revision [399]

Last edited on 2010-09-12 21:10:15 by JohnMcIntosh
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
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.
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 created on 2008-10-16 22:38:00 by JohnMcIntosh
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki