<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, May 2, 2017 at 7:27 PM, tim Rowledge <span dir="ltr"><<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This is mostly a problem when the OS window drawing code is in a separate thread; if the VM is doing a GC and the window is moved on-screen the OS will send some event about the move, the thread will try to read the partly-processed Display values, they will be … odd… and strange things will happen.<br></blockquote><div><br></div><div>Well it should "just" be a visual glitch. Unless the bitmap is pinned, the GC could move it during the copy-to-screen, even if you grab the pointer right before.</div><div><br></div><div>So how about simply fixing it up after the copy-to-screen? Save display/bitmap oop before, compare afterwards, and if changed, just draw again.</div><div><br></div><div>- Bert - </div></div><br></div></div>