Loading core/java/android/view/ViewRootImpl.java +6 −0 Original line number Diff line number Diff line Loading @@ -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, Loading Loading @@ -7710,6 +7715,7 @@ public final class ViewRootImpl implements ViewParent, } } if (mAttachInfo.mThreadedRenderer != null) { addASurfaceTransactionCallback(); mAttachInfo.mThreadedRenderer.setSurfaceControl(mSurfaceControl); } } else { Loading libs/hwui/renderthread/CanvasContext.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,10 @@ void CanvasContext::setSurfaceControl(ASurfaceControl* surfaceControl) { auto funcs = mRenderThread.getASurfaceControlFunctions(); if (surfaceControl == nullptr) { setASurfaceTransactionCallback(nullptr); } if (mSurfaceControl != nullptr) { funcs.unregisterListenerFunc(this, &onSurfaceStatsAvailable); funcs.releaseFunc(mSurfaceControl); Loading Loading
core/java/android/view/ViewRootImpl.java +6 −0 Original line number Diff line number Diff line Loading @@ -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, Loading Loading @@ -7710,6 +7715,7 @@ public final class ViewRootImpl implements ViewParent, } } if (mAttachInfo.mThreadedRenderer != null) { addASurfaceTransactionCallback(); mAttachInfo.mThreadedRenderer.setSurfaceControl(mSurfaceControl); } } else { Loading
libs/hwui/renderthread/CanvasContext.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,10 @@ void CanvasContext::setSurfaceControl(ASurfaceControl* surfaceControl) { auto funcs = mRenderThread.getASurfaceControlFunctions(); if (surfaceControl == nullptr) { setASurfaceTransactionCallback(nullptr); } if (mSurfaceControl != nullptr) { funcs.unregisterListenerFunc(this, &onSurfaceStatsAvailable); funcs.releaseFunc(mSurfaceControl); Loading