[Vm-dev] iOS VM problems with dragging a morph and
PasteUpMorph>>flashRects:color:
Javier Diaz-Reinoso
javier_diaz_r at mac.com
Mon Oct 26 17:09:02 UTC 2015
As i reported in the Squeak list I find a bug with dragging a morph and in PasteUpMorph>>flashRects:color:, I find the problem is with the implementation of DisplayScreen>>forceDisplayUpdate in the VM, specifically in ioForceDisplayUpdateActual in sqSqueakScreenAndWindow.m, the actual implementation call drawTheLayers using a queue:
dispatch_async(dispatch_get_main_queue(), ^{
[[self getMainView] drawThelayers];
});
I find this is unreliable, calling directly to drawTheLayers the bug is corrected, I believe that this is the correct operation because what you want is an immediate update otherwise the “timing” of the operation is lost, like in PasteUpMorph>>flashRects:color:, between the first and second call to copyBits are only 15 milliseconds, I suppose is the same with the drag of a morph.
I don’t know if this change create new problems, appears to be working OK in an iPad2 (32 bits) and a iPad mini (64 bits).
By the way I tested also using [SqueakUIViewOpenGL class] instead of [SqueakUIViewCALayer class] in whatRenderCanWeUse, that works OK in the iPad2 but create a small image in the iPad mini, I think is not taking into account the 2X of the retina display.
More information about the Vm-dev
mailing list