Loading core/java/android/webkit/WebViewClassic.java +15 −9 Original line number Diff line number Diff line Loading @@ -2069,11 +2069,20 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc } private void destroyImpl() { int drawGLFunction = nativeGetDrawGLFunction(mNativeClass); ViewRootImpl viewRoot = mWebView.getViewRootImpl(); Log.d(LOGTAG, String.format("destroyImpl, functor %x, viewroot == null %b, isHWAccel %b", drawGLFunction, (viewRoot == null), mWebView.isHardwareAccelerated())); if (viewRoot != null) { Log.e(LOGTAG, "Error: WebView.destroy() called while still attached!"); } if (mWebView.isHardwareAccelerated()) { int drawGLFunction = nativeGetDrawGLFunction(mNativeClass); if (drawGLFunction != 0 && viewRoot != null) { // functor should have been detached in onDetachedFromWindow, do // additionally here for safety viewRoot.detachFunctor(drawGLFunction); } } mCallbackProxy.blockMessages(); clearHelpers(); if (mListBoxDialog != null) { Loading Loading @@ -5301,12 +5310,9 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc updateHwAccelerated(); if (mWebView.isHardwareAccelerated()) { int drawGLFunction = nativeGetDrawGLFunction(mNativeClass); ViewRootImpl viewRoot = mWebView.getViewRootImpl(); Log.d(LOGTAG, String.format("destroyImpl, functor %x, viewroot == null %b, isHWAccel %b", drawGLFunction, (viewRoot == null), mWebView.isHardwareAccelerated())); if (mWebView.isHardwareAccelerated()) { if (drawGLFunction != 0 && viewRoot != null) { viewRoot.detachFunctor(drawGLFunction); } Loading libs/hwui/OpenGLRenderer.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -262,7 +262,6 @@ void OpenGLRenderer::resume() { } void OpenGLRenderer::detachFunctor(Functor* functor) { ALOGD("opengl renderer %p detaching functor %p", this, functor); mFunctors.remove(functor); } Loading Loading @@ -310,7 +309,7 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) { status_t OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& dirty) { interrupt(); mFunctors.remove(functor); detachFunctor(functor); if (mDirtyClip) { setScissorFromClip(); Loading Loading
core/java/android/webkit/WebViewClassic.java +15 −9 Original line number Diff line number Diff line Loading @@ -2069,11 +2069,20 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc } private void destroyImpl() { int drawGLFunction = nativeGetDrawGLFunction(mNativeClass); ViewRootImpl viewRoot = mWebView.getViewRootImpl(); Log.d(LOGTAG, String.format("destroyImpl, functor %x, viewroot == null %b, isHWAccel %b", drawGLFunction, (viewRoot == null), mWebView.isHardwareAccelerated())); if (viewRoot != null) { Log.e(LOGTAG, "Error: WebView.destroy() called while still attached!"); } if (mWebView.isHardwareAccelerated()) { int drawGLFunction = nativeGetDrawGLFunction(mNativeClass); if (drawGLFunction != 0 && viewRoot != null) { // functor should have been detached in onDetachedFromWindow, do // additionally here for safety viewRoot.detachFunctor(drawGLFunction); } } mCallbackProxy.blockMessages(); clearHelpers(); if (mListBoxDialog != null) { Loading Loading @@ -5301,12 +5310,9 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc updateHwAccelerated(); if (mWebView.isHardwareAccelerated()) { int drawGLFunction = nativeGetDrawGLFunction(mNativeClass); ViewRootImpl viewRoot = mWebView.getViewRootImpl(); Log.d(LOGTAG, String.format("destroyImpl, functor %x, viewroot == null %b, isHWAccel %b", drawGLFunction, (viewRoot == null), mWebView.isHardwareAccelerated())); if (mWebView.isHardwareAccelerated()) { if (drawGLFunction != 0 && viewRoot != null) { viewRoot.detachFunctor(drawGLFunction); } Loading
libs/hwui/OpenGLRenderer.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -262,7 +262,6 @@ void OpenGLRenderer::resume() { } void OpenGLRenderer::detachFunctor(Functor* functor) { ALOGD("opengl renderer %p detaching functor %p", this, functor); mFunctors.remove(functor); } Loading Loading @@ -310,7 +309,7 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) { status_t OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& dirty) { interrupt(); mFunctors.remove(functor); detachFunctor(functor); if (mDirtyClip) { setScissorFromClip(); Loading