Merge "Turn off AA while notification expanding animation is running"
This commit is contained in:
committed by
Android (Google) Code Review
commit
ea2bc6ffbc
@@ -825,6 +825,14 @@ public class GradientDrawable extends Drawable {
|
||||
mFillPaint.setXfermode(mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param aa to draw this drawable with
|
||||
* @hide
|
||||
*/
|
||||
public void setAntiAlias(boolean aa) {
|
||||
mFillPaint.setAntiAlias(aa);
|
||||
}
|
||||
|
||||
private void buildPathIfDirty() {
|
||||
final GradientState st = mGradientState;
|
||||
if (mPathIsDirty) {
|
||||
|
||||
@@ -249,6 +249,9 @@ public class NotificationBackgroundView extends View {
|
||||
(GradientDrawable) ((LayerDrawable) mBackground).getDrawable(0);
|
||||
gradientDrawable.setXfermode(
|
||||
running ? new PorterDuffXfermode(PorterDuff.Mode.SRC) : null);
|
||||
// Speed optimization: disable AA if transfer mode is not SRC_OVER. AA is not easy to
|
||||
// spot during animation anyways.
|
||||
gradientDrawable.setAntiAlias(!running);
|
||||
}
|
||||
if (!mExpandAnimationRunning) {
|
||||
setDrawableAlpha(mDrawableAlpha);
|
||||
|
||||
Reference in New Issue
Block a user