diff options
author | Chris Craik <ccraik@google.com> | 2012-06-05 12:31:31 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-06-05 12:31:31 -0700 |
commit | 34e5f5a534d915f253ae51cbcfe15c12e25a78a4 (patch) | |
tree | 147ecd3055f6f3a1689f730ce6c9733ef1dad336 | |
parent | 4a683a343083ec2b8aed1ee63669dbade6c0379f (diff) | |
parent | 3676b137ecf2f24e88e8a3567c11234e7d4416d2 (diff) | |
download | frameworks_base-34e5f5a534d915f253ae51cbcfe15c12e25a78a4.zip frameworks_base-34e5f5a534d915f253ae51cbcfe15c12e25a78a4.tar.gz frameworks_base-34e5f5a534d915f253ae51cbcfe15c12e25a78a4.tar.bz2 |
am 3676b137: Merge "Add more temporary logging for investigating detachFunctor" into jb-dev
* commit '3676b137ecf2f24e88e8a3567c11234e7d4416d2':
Add more temporary logging for investigating detachFunctor
-rw-r--r-- | core/java/android/view/HardwareRenderer.java | 2 | ||||
-rw-r--r-- | core/java/android/view/ViewRootImpl.java | 3 | ||||
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 7 |
3 files changed, 9 insertions, 3 deletions
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java index 7e86ea3..c0d76cf 100644 --- a/core/java/android/view/HardwareRenderer.java +++ b/core/java/android/view/HardwareRenderer.java @@ -1229,7 +1229,7 @@ public abstract class HardwareRenderer { void detachFunctor(int functor) { if (mCanvas != null) { mCanvas.detachFunctor(functor); - } + } else Log.e(LOG_TAG, "can't detachFunctor, have no canvas"); } @Override diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 3138692..6c24b86 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -678,6 +678,9 @@ public final class ViewRootImpl implements ViewParent, } public void detachFunctor(int functor) { + Log.e(HardwareRenderer.LOG_TAG, String.format("detachFunctor, mHarwareRenderer==null %b, enabled %b", + mAttachInfo.mHardwareRenderer == null, + mAttachInfo.mHardwareRenderer == null ? false : mAttachInfo.mHardwareRenderer.isEnabled())); if (mAttachInfo.mHardwareRenderer != null && mAttachInfo.mHardwareRenderer.isEnabled()) { mAttachInfo.mHardwareRenderer.detachFunctor(functor); } diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 2dc9726..c5fedba 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -262,7 +262,10 @@ void OpenGLRenderer::resume() { } void OpenGLRenderer::detachFunctor(Functor* functor) { - mFunctors.remove(functor); + int size = mFunctors.size(); + int remove = mFunctors.remove(functor); + ALOGD("OGLR %p detachFunctor %p, removed at index %d of %d", + this, functor, remove, size); } void OpenGLRenderer::attachFunctor(Functor* functor) { @@ -309,7 +312,7 @@ status_t OpenGLRenderer::invokeFunctors(Rect& dirty) { status_t OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& dirty) { interrupt(); - detachFunctor(functor); + mFunctors.remove(functor); if (mDirtyClip) { setScissorFromClip(); |