Skip to content

Commit f8dafa1

Browse files
committed
Add temporary functor lifetime logging
bug:6535911 Change-Id: Ida5cc1def7fe1fc314317bbc5df50e1465753deb
1 parent c8538ad commit f8dafa1

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

core/java/android/webkit/WebViewClassic.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2069,6 +2069,11 @@ public void destroy() {
20692069
}
20702070

20712071
private void destroyImpl() {
2072+
int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
2073+
ViewRootImpl viewRoot = mWebView.getViewRootImpl();
2074+
Log.d(LOGTAG, String.format("destroyImpl, functor %x, viewroot == null %b, isHWAccel %b",
2075+
drawGLFunction, (viewRoot == null),
2076+
mWebView.isHardwareAccelerated()));
20722077
mCallbackProxy.blockMessages();
20732078
clearHelpers();
20742079
if (mListBoxDialog != null) {
@@ -5296,9 +5301,12 @@ public void onDetachedFromWindow() {
52965301

52975302
updateHwAccelerated();
52985303

5304+
int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
5305+
ViewRootImpl viewRoot = mWebView.getViewRootImpl();
5306+
Log.d(LOGTAG, String.format("destroyImpl, functor %x, viewroot == null %b, isHWAccel %b",
5307+
drawGLFunction, (viewRoot == null),
5308+
mWebView.isHardwareAccelerated()));
52995309
if (mWebView.isHardwareAccelerated()) {
5300-
int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
5301-
ViewRootImpl viewRoot = mWebView.getViewRootImpl();
53025310
if (drawGLFunction != 0 && viewRoot != null) {
53035311
viewRoot.detachFunctor(drawGLFunction);
53045312
}

libs/hwui/OpenGLRenderer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ void OpenGLRenderer::resume() {
250250
}
251251

252252
void OpenGLRenderer::detachFunctor(Functor* functor) {
253+
ALOGD("opengl renderer %p detaching functor %p", this, functor);
253254
mFunctors.remove(functor);
254255
}
255256

@@ -302,7 +303,7 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) {
302303

303304
status_t OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& dirty) {
304305
interrupt();
305-
detachFunctor(functor);
306+
mFunctors.remove(functor);
306307

307308
if (mDirtyClip) {
308309
setScissorFromClip();

0 commit comments

Comments
 (0)