Merge "Make launcher opaque when scrim becomes opaque" into sc-dev
This commit is contained in:
@@ -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