From 54ab347fdde0e4d14d923cca80e5bcc7b879fc52 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Thu, 14 Jun 2012 12:52:53 -0700 Subject: Don't create a giant layer for all notifications Bug #6642475 When expanding the status bar, create one layer per notification instead of a single giant layer for the pile of notifications. This prevents layer creation failure when the total height of the notifications is larger than the maximum allowed texture size in OpenGL ES 2.0. This change only enables layers on notifications that will be visible once the notification area is fully expanded. Change-Id: I3c791a66cf5ac0973f3a65cfcd84b95209d580f3 --- core/java/android/view/WindowManagerImpl.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'core/java/android/view/WindowManagerImpl.java') diff --git a/core/java/android/view/WindowManagerImpl.java b/core/java/android/view/WindowManagerImpl.java index 5d33cecd7078..dd6b5371d479 100644 --- a/core/java/android/view/WindowManagerImpl.java +++ b/core/java/android/view/WindowManagerImpl.java @@ -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) -- cgit v1.2.3