diff options
author | Jamie Gennis <jgennis@google.com> | 2011-11-11 08:02:26 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-11 08:02:26 +0000 |
commit | 787e2c276a5645ffbaddc5c23f4deb66d182e80d (patch) | |
tree | 922d7450fe70d699ea99d3f4375da6263c0ed602 /packages/SystemUI | |
parent | 51c00a57f4f956b4b0ce9562fa571b475ee6f6ae (diff) | |
parent | ca5c881374d051361eb5f9a191d51b5716ef2366 (diff) | |
download | frameworks_base-787e2c276a5645ffbaddc5c23f4deb66d182e80d.zip frameworks_base-787e2c276a5645ffbaddc5c23f4deb66d182e80d.tar.gz frameworks_base-787e2c276a5645ffbaddc5c23f4deb66d182e80d.tar.bz2 |
am ca5c8813: Merge "SystemUI: Disable HW acceleration for status bar" into ics-mr0
* commit 'ca5c881374d051361eb5f9a191d51b5716ef2366':
SystemUI: Disable HW acceleration for status bar
Diffstat (limited to 'packages/SystemUI')
-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"); |