[Remoting Android] GlDisplay.invalidate should be called on UI thread |
||
Issue description
Currently the native pointer in GlDisplay is used on UI thread and null'ed on display thread like this:
Using:
if (mNativeJniGlDisplay != 0) {
call native function...
}
Invalidating:
mNativeJniGlDisplay = 0;
And there is no synchronization (except for just marking the native pointer as volatile). If invalidation happens between the check and actually calling the native function, then the app will crash.
Currently no crash caused by this has been repro'ed since it's very unlikely to happen, but we should still fix this to prevent flakiness.
,
Oct 4 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b78ae9e328113495720d85810d08bd8dd9bf53da commit b78ae9e328113495720d85810d08bd8dd9bf53da Author: yuweih <yuweih@chromium.org> Date: Tue Oct 04 23:12:52 2016 [Remoting Android] Separate the display core from JniGlDisplayHandler This CL separates the core that lives entirely on the display thread from JniGlDisplayHandler so that the thread model can be clearer. BUG= 646116 Review-Url: https://codereview.chromium.org/2389463002 Cr-Commit-Position: refs/heads/master@{#422988} [modify] https://crrev.com/b78ae9e328113495720d85810d08bd8dd9bf53da/remoting/client/jni/jni_client.cc [modify] https://crrev.com/b78ae9e328113495720d85810d08bd8dd9bf53da/remoting/client/jni/jni_gl_display_handler.cc [modify] https://crrev.com/b78ae9e328113495720d85810d08bd8dd9bf53da/remoting/client/jni/jni_gl_display_handler.h
,
Oct 5 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Sep 20 2016