Merge "Add temporary functor lifetime logging" into jb-dev

This commit is contained in:
Chris Craik
2012-05-22 14:39:13 -07:00
committed by Android (Google) Code Review
2 changed files with 12 additions and 3 deletions

View File

@@ -2069,6 +2069,11 @@ 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()));
mCallbackProxy.blockMessages();
clearHelpers();
if (mListBoxDialog != null) {
@@ -5296,9 +5301,12 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
updateHwAccelerated();
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()) {
int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
ViewRootImpl viewRoot = mWebView.getViewRootImpl();
if (drawGLFunction != 0 && viewRoot != null) {
viewRoot.detachFunctor(drawGLFunction);
}

View File

@@ -262,6 +262,7 @@ void OpenGLRenderer::resume() {
}
void OpenGLRenderer::detachFunctor(Functor* functor) {
ALOGD("opengl renderer %p detaching functor %p", this, functor);
mFunctors.remove(functor);
}
@@ -309,7 +310,7 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) {
status_t OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& dirty) {
interrupt();
detachFunctor(functor);
mFunctors.remove(functor);
if (mDirtyClip) {
setScissorFromClip();