Skip to content

Commit b69f701

Browse files
dsandlerpixelflinger
authored andcommitted
Use hardware acceleration in all status bar windows.
(Only applies to high-end devices. In situations where memory budget or GPU/overlay support are lacking these will still be done in software.) Bug: 5233443 Change-Id: I668def10598f6a818d8011ba6dd8d1dd5440ae5e
1 parent 8e147b2 commit b69f701

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1829,7 +1829,6 @@ void onBarViewAttached() {
18291829
Drawable bg;
18301830

18311831
/// ---------- Tracking View --------------
1832-
pixelFormat = PixelFormat.RGBX_8888;
18331832
bg = mTrackingView.getBackground();
18341833
if (bg != null) {
18351834
pixelFormat = bg.getOpacity();
@@ -1843,7 +1842,10 @@ void onBarViewAttached() {
18431842
| WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
18441843
| WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
18451844
| WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
1846-
pixelFormat);
1845+
PixelFormat.OPAQUE);
1846+
if (ActivityManager.isHighEndGfx(mDisplay)) {
1847+
lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
1848+
}
18471849
// lp.token = mStatusBarView.getWindowToken();
18481850
lp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL;
18491851
lp.setTitle("TrackingView");
@@ -1870,6 +1872,9 @@ void onTrackingViewAttached() {
18701872
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
18711873
| WindowManager.LayoutParams.FLAG_DITHER
18721874
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
1875+
if (ActivityManager.isHighEndGfx(mDisplay)) {
1876+
lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
1877+
}
18731878
lp.format = pixelFormat;
18741879
lp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL;
18751880
lp.setTitle("StatusBarExpanded");

0 commit comments

Comments
 (0)