Skip to content

Commit 3421f9f

Browse files
ChrisCraikAndroid (Google) Code Review
authored andcommitted
Merge "Add temporary functor lifetime logging" into jb-dev
2 parents 232301b + 2fe9980 commit 3421f9f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

core/java/android/webkit/WebViewClassic.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,6 +2017,11 @@ public void destroy() {
20172017
}
20182018

20192019
private void destroyImpl() {
2020+
int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
2021+
ViewRootImpl viewRoot = mWebView.getViewRootImpl();
2022+
Log.d(LOGTAG, String.format("destroyImpl, drawGLFunction %x, viewroot == null %b, isHWAccel %b",
2023+
drawGLFunction, (viewRoot == null), mWebView.isHardwareAccelerated()));
2024+
20202025
mCallbackProxy.blockMessages();
20212026
clearHelpers();
20222027
if (mListBoxDialog != null) {
@@ -5429,9 +5434,11 @@ public void onDetachedFromWindow() {
54295434
removeAccessibilityApisFromJavaScript();
54305435
updateHwAccelerated();
54315436

5437+
int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
5438+
ViewRootImpl viewRoot = mWebView.getViewRootImpl();
5439+
Log.d(LOGTAG, String.format("onDetachedFromWindow, drawGLFunction %x, viewroot == null %b, isHWAccel %b",
5440+
drawGLFunction, (viewRoot == null), mWebView.isHardwareAccelerated()));
54325441
if (mWebView.isHardwareAccelerated()) {
5433-
int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
5434-
ViewRootImpl viewRoot = mWebView.getViewRootImpl();
54355442
if (drawGLFunction != 0 && viewRoot != null) {
54365443
viewRoot.detachFunctor(drawGLFunction);
54375444
}

libs/hwui/OpenGLRenderer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ void OpenGLRenderer::resume() {
247247
}
248248

249249
void OpenGLRenderer::detachFunctor(Functor* functor) {
250+
ALOGD("OGLR %p detachFunctor %p", this, functor);
250251
mFunctors.remove(functor);
251252
}
252253

0 commit comments

Comments
 (0)