summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorMihai Popa <popam@google.com>2019-06-17 12:34:50 +0100
committerMihai Popa <popam@google.com>2019-06-17 11:59:20 +0000
commite42215ea70149e3ac92aa8d873b7f10e9bc48fe5 (patch)
tree04cd69378e0a17d37adbb9e8f05109008e57a56e /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parentd0311132903786ff7c6ebed9762fb1e963b60f59 (diff)
[Magnifier-87] Fix deadlock causing ANR
Before this CL, the magnifier could deadlock when the following happened: 1. the renderer is asked to draw (and a frame callback is provided) 2. a #dismiss() happens on the UI thread. This acquires mDestroyLock (previously line 309) 3. InternalPopupWindow#destroy() is called, and this calls mRenderer.destroy(). This attempts to destroy the renderer on the UI thread, however the UI thread will wait until the pending frame callback corresponding to step 1 is executed on the render thread. 4. The frame callback starts executing on the render thread, and tries to acquire mDestroyLock (previously line 1093). However, this is held by the UI thread, so a deadlock happens. This CL completely removes mDestroyLock, relying on the existing synchronization between the UI and render threads described in step 3. Bug: 134584742 Test: manual testing Change-Id: Ia4c75b5b997e0ed94d5a3814dd4507a8fffa124d
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions