File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
packages/SystemUI/src/com/android/systemui/statusbar Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -118,15 +118,20 @@ public void start() {
118118 WindowManager .LayoutParams .FLAG_NOT_FOCUSABLE
119119 | WindowManager .LayoutParams .FLAG_TOUCHABLE_WHEN_WAKING
120120 | WindowManager .LayoutParams .FLAG_SPLIT_TOUCH ,
121- PixelFormat .OPAQUE );
121+ // We use a pixel format of RGB565 for the status bar to save memory bandwidth and
122+ // to ensure that the layer can be handled by HWComposer. On some devices the
123+ // HWComposer is unable to handle SW-rendered RGBX_8888 layers.
124+ PixelFormat .RGB_565 );
122125
123126 // the status bar should be in an overlay if possible
124127 final Display defaultDisplay
125128 = ((WindowManager )mContext .getSystemService (Context .WINDOW_SERVICE ))
126129 .getDefaultDisplay ();
127- if (ActivityManager .isHighEndGfx (defaultDisplay )) {
128- lp .flags |= WindowManager .LayoutParams .FLAG_HARDWARE_ACCELERATED ;
129- }
130+
131+ // We explicitly leave FLAG_HARDWARE_ACCELERATED out of the flags. The status bar occupies
132+ // very little screen real-estate and is updated fairly frequently. By using CPU rendering
133+ // for the status bar, we prevent the GPU from having to wake up just to do these small
134+ // updates, which should help keep power consumption down.
130135
131136 lp .gravity = getStatusBarGravity ();
132137 lp .setTitle ("StatusBar" );
You can’t perform that action at this time.
0 commit comments