<p></p>
<p dir="auto">As of <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/2d7105db755928fd90823d264fc64e17b1c57ad4/hovercard" href="https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/2d7105db755928fd90823d264fc64e17b1c57ad4"><tt>2d7105d</tt></a>, there can be flickering or invisible Morphic dragging if no image-side composition buffer is used.</p>
<p dir="auto">In Squeak, that composition buffer is either already used or can be activated for older images by hand via:</p>
<div class="highlight highlight-source-smalltalk"><pre><span class="pl-c1">PasteUpMorph</span> <span class="pl-c1">disableDeferredUpdates:</span> <span class="pl-c1">true</span>.
<span class="pl-c1">Project</span> allMorphicProjects <span class="pl-c1">do:</span> [<span class="pl-en">:ea</span> | ea world <span class="pl-c1">canvas:</span> <span class="pl-c1">nil</span>].</pre></div>
<p dir="auto">Also see:</p>
<ul dir="auto">
<li><a href="http://lists.squeakfoundation.org/pipermail/vm-dev/2022-April/037907.html" rel="nofollow">http://lists.squeakfoundation.org/pipermail/vm-dev/2022-April/037907.html</a></li>
<li><a href="http://lists.squeakfoundation.org/pipermail/vm-dev/2022-April/037888.html" rel="nofollow">http://lists.squeakfoundation.org/pipermail/vm-dev/2022-April/037888.html</a></li>
<li><a href="http://lists.squeakfoundation.org/pipermail/vm-dev/2022-April/037891.html" rel="nofollow">http://lists.squeakfoundation.org/pipermail/vm-dev/2022-April/037891.html</a></li>
<li><a href="http://lists.squeakfoundation.org/pipermail/vm-dev/2022-April/037897.html" rel="nofollow">http://lists.squeakfoundation.org/pipermail/vm-dev/2022-April/037897.html</a></li>
</ul>
<p dir="auto">For the macOS <code class="notranslate">--metal</code> backend, one might actually implement that extra video buffer here:<br>
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/2d7105db755928fd90823d264fc64e17b1c57ad4/platforms/iOS/vm/OSX/sqSqueakOSXMetalView.m#L229">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/2d7105db755928fd90823d264fc64e17b1c57ad4/platforms/iOS/vm/OSX/sqSqueakOSXMetalView.m#L229</a></p>
<p dir="auto">And then read from that buffer and <strong>not</strong> the <code class="notranslate">displayBits</code> here:<br>
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/2d7105db755928fd90823d264fc64e17b1c57ad4/platforms/iOS/vm/OSX/sqSqueakOSXMetalView.m#L271">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/2d7105db755928fd90823d264fc64e17b1c57ad4/platforms/iOS/vm/OSX/sqSqueakOSXMetalView.m#L271</a></p>
<p dir="auto">...but <strong>only if</strong> the <code class="notranslate">deferDisplayUpdates</code> flag is <code class="notranslate">false</code> again.</p>
<p dir="auto"><strong>NOTE THAT</strong> the old approach to always commit content from <code class="notranslate">displayBits</code> to the graphics backend entailed a <em>serious performance regression</em>  as it slows down the interpreter loop to a maximum of 60 FPS, regardless of other stuff waiting in the image side. That is, primitives 127 and 231 were awfully slow and blocking on macOS. At least that got better in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/2d7105db755928fd90823d264fc64e17b1c57ad4/hovercard" href="https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/2d7105db755928fd90823d264fc64e17b1c57ad4"><tt>2d7105d</tt></a></p>
<hr>
<p dir="auto">Another, more flexible, approach would be to fix <strong>primitive 126</strong> to actually <em>fail</em> if a certain graphics backend does not support deferred updates. This might work if platform-specific code would be able to let that primitive fail. See:</p>
<ul dir="auto">
<li><code class="notranslate">StackInterpreterPrimitives >> primitiveDeferDisplayUpdates</code> in VMMaker</li>
</ul>
<p dir="auto">This would work for recent versions of Cuis. However, the existing code in older Squeak images did not correctly invalidate the canvas and thus was not even able to flip between image-side and vm-side composition buffer for different results of primitive 126. Thus, such a fix would also only work from here on for future versions of Squeak and Cuis.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/627">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEW7XBX5KQ6M6PSQHNH3VHJBX3ANCNFSM5URRNFFQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AIJPEW3X55KE3ZYV34HMBR3VHJBX3A5CNFSM5URRNFF2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4SE6XJ6Q.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><OpenSmalltalk/opensmalltalk-vm/issues/627</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/627",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/627",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>