Merge "Make launcher opaque when scrim becomes opaque" into sc-dev am: c2bcdcee9b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14654426 Change-Id: I99ac839e85f7e8638599b4e3f715621028341d58
This commit is contained in:
commit
b1b6d8aee9
2 files changed
+17
-9
No files matched your search
@@ -217,17 +217,11 @@ public class DepthController implements StateHandler<LauncherState>,
|
||||
}
|
||||
|
||||
if (supportsBlur) {
|
||||
final int blur;
|
||||
if (mLauncher.isInState(LauncherState.ALL_APPS) && mDepth == 1) {
|
||||
// All apps has a solid background. We don't need to draw blurs after it's fully
|
||||
// visible. This will take us out of GPU composition, saving battery and increasing
|
||||
// performance.
|
||||
blur = 0;
|
||||
} else {
|
||||
blur = (int) (mDepth * mMaxBlurRadius);
|
||||
}
|
||||
boolean isOpaque = mLauncher.getScrimView().isFullyOpaque();
|
||||
int blur = isOpaque ? 0 : (int) (mDepth * mMaxBlurRadius);
|
||||
new TransactionCompat()
|
||||
.setBackgroundBlurRadius(mSurface, blur)
|
||||
.setOpaque(mSurface, isOpaque)
|
||||
.apply();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user