am 06116b08: am a989b334: Merge "Don\'t create a giant layer for all notifications Bug #6642475" into jb-dev

* commit '06116b08dad51923672dde2d884baf0e0dc70d2e':
  Don't create a giant layer for all notifications Bug #6642475
This commit is contained in:
Romain Guy
2012-06-14 14:51:30 -07:00
committed by Android Git Automerger
3 changed files with 62 additions and 9 deletions

View File

@@ -3926,10 +3926,9 @@ public final class ViewRootImpl implements ViewParent,
}
public void dumpGfxInfo(int[] info) {
info[0] = info[1] = 0;
if (mView != null) {
getGfxInfo(mView, info);
} else {
info[0] = info[1] = 0;
}
}

View File

@@ -530,13 +530,16 @@ public class WindowManagerImpl implements WindowManager {
for (int i = 0; i < count; i++) {
ViewRootImpl root = mRoots[i];
String name = getWindowName(root);
pw.printf("\n\t%s", name);
HardwareRenderer renderer = root.getView().mAttachInfo.mHardwareRenderer;
if (renderer != null) {
renderer.dumpGfxInfo(pw);
}
}
pw.println("\nView hierarchy:");
pw.println("\nView hierarchy:\n");
int viewsCount = 0;
int displayListsSize = 0;
@@ -546,15 +549,14 @@ public class WindowManagerImpl implements WindowManager {
ViewRootImpl root = mRoots[i];
root.dumpGfxInfo(info);
String name = root.getClass().getName() + '@' +
Integer.toHexString(hashCode());
pw.printf(" %s: %d views, %.2f kB (display lists)",
String name = getWindowName(root);
pw.printf(" %s\n %d views, %.2f kB of display lists",
name, info[0], info[1] / 1024.0f);
HardwareRenderer renderer = root.getView().mAttachInfo.mHardwareRenderer;
if (renderer != null) {
pw.printf(", %d frames rendered", renderer.getFrameCount());
}
pw.printf("\n");
pw.printf("\n\n");
viewsCount += info[0];
displayListsSize += info[1];
@@ -570,6 +572,11 @@ public class WindowManagerImpl implements WindowManager {
}
}
private static String getWindowName(ViewRootImpl root) {
return root.mWindowAttributes.getTitle() + "/" +
root.getClass().getName() + '@' + Integer.toHexString(root.hashCode());
}
public void setStoppedState(IBinder token, boolean stopped) {
synchronized (this) {
if (mViews == null)