diff options
| author | Huihong Luo <huisinro@google.com> | 2021-05-14 03:33:53 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-05-14 03:33:53 +0000 |
| commit | f410f8134f6143598251b1ba1fd1f9b92ccbcb09 (patch) | |
| tree | 8adae29d7d050c6e6ebde5629ca0bbe3945381e7 /core/java/android/view/ViewRootImpl.java | |
| parent | 23f813e89b0dd4d635391ed4905078aac3445003 (diff) | |
| parent | e76f1813721c1087ac53bd5cbe854d412e21789e (diff) | |
Merge "Fix leakage of ASurfaceTransactionCallback" into sc-dev
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 4d1c66619819..bf8785adc79d 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -1356,6 +1356,11 @@ public final class ViewRootImpl implements ViewParent, } } + /** + * Register a callback to be executed when Webview overlay needs to merge a transaction. + * This callback will be executed on RenderThread worker thread, and released inside native code + * when CanvasContext is destroyed. + */ private void addASurfaceTransactionCallback() { HardwareRenderer.ASurfaceTransactionCallback callback = (nativeTransactionObj, nativeSurfaceControlObj, @@ -7710,6 +7715,7 @@ public final class ViewRootImpl implements ViewParent, } } if (mAttachInfo.mThreadedRenderer != null) { + addASurfaceTransactionCallback(); mAttachInfo.mThreadedRenderer.setSurfaceControl(mSurfaceControl); } } else { |
