summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-06-05 12:28:49 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-06-05 12:28:49 -0700
commit3676b137ecf2f24e88e8a3567c11234e7d4416d2 (patch)
treeeee0c23e361f4b4ecae2f9029fe61d572ee3bace
parent1ad66b2f873496bcbe72e91d1978cf1b2633b3a4 (diff)
parent8857b2f76abad1e4ec742dfd85d0c997880be376 (diff)
downloadframeworks_base-3676b137ecf2f24e88e8a3567c11234e7d4416d2.zip
frameworks_base-3676b137ecf2f24e88e8a3567c11234e7d4416d2.tar.gz
frameworks_base-3676b137ecf2f24e88e8a3567c11234e7d4416d2.tar.bz2
Merge "Add more temporary logging for investigating detachFunctor" into jb-dev
-rw-r--r--core/java/android/view/HardwareRenderer.java2
-rw-r--r--core/java/android/view/ViewRootImpl.java3
-rw-r--r--libs/hwui/OpenGLRenderer.cpp7
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();