diff options
author | Jamie Gennis <jgennis@google.com> | 2011-11-09 12:43:25 -0800 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2011-11-09 16:29:48 -0800 |
commit | 87abde8a529c8768f65ed7281d5e89eda170e0f6 (patch) | |
tree | 11815e7ffff3c1439e1bf97e934f8eb4ee4d132f /packages/SystemUI/src/com/android | |
parent | 59882fb8e0ba7c47b780d62c9a9c46b63d779677 (diff) | |
download | frameworks_base-87abde8a529c8768f65ed7281d5e89eda170e0f6.zip frameworks_base-87abde8a529c8768f65ed7281d5e89eda170e0f6.tar.gz frameworks_base-87abde8a529c8768f65ed7281d5e89eda170e0f6.tar.bz2 |
SystemUI: Disable HW acceleration for status bar
This change switches the status bar rendering to use CPU rendering to an
RGB_565 window.
Change-Id: I45c03989efc9cc9ea71ff169fafedf048de9d612
Diffstat (limited to 'packages/SystemUI/src/com/android')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java index 2e1803e..2be35b7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java @@ -118,15 +118,20 @@ public abstract class StatusBar extends SystemUI implements CommandQueue.Callbac WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH, - PixelFormat.OPAQUE); + // We use a pixel format of RGB565 for the status bar to save memory bandwidth and + // to ensure that the layer can be handled by HWComposer. On some devices the + // HWComposer is unable to handle SW-rendered RGBX_8888 layers. + PixelFormat.RGB_565); // the status bar should be in an overlay if possible final Display defaultDisplay = ((WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE)) .getDefaultDisplay(); - if (ActivityManager.isHighEndGfx(defaultDisplay)) { - lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED; - } + + // We explicitly leave FLAG_HARDWARE_ACCELERATED out of the flags. The status bar occupies + // very little screen real-estate and is updated fairly frequently. By using CPU rendering + // for the status bar, we prevent the GPU from having to wake up just to do these small + // updates, which should help keep power consumption down. lp.gravity = getStatusBarGravity(); lp.setTitle("StatusBar"); |