diff options
author | Chris Craik <ccraik@google.com> | 2015-05-12 16:36:28 +0000 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2015-05-12 16:36:49 +0000 |
commit | dfe0a66ceca530e0777ebfab20f81103baa18f14 (patch) | |
tree | c6c694f61a07824efda588c7c941dab2672459d6 /graphics | |
parent | 356a26122bf928709d88cdc9a4a304b4495b1b31 (diff) | |
download | frameworks_base-dfe0a66ceca530e0777ebfab20f81103baa18f14.zip frameworks_base-dfe0a66ceca530e0777ebfab20f81103baa18f14.tar.gz frameworks_base-dfe0a66ceca530e0777ebfab20f81103baa18f14.tar.bz2 |
Revert "Use default constructor to get anti-aliasing"
bug:20948129
This reverts commit 58fc522a69e8ddf9ac8530ce88e9c2c92da1dd14.
Change-Id: Iddeccb4ad15b843bb3e610bd3673a0c7abc1bf46
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/drawable/GradientDrawable.java | 6 | ||||
-rw-r--r-- | graphics/java/android/graphics/drawable/ShapeDrawable.java | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java index dc9aa67..4c2817c 100644 --- a/graphics/java/android/graphics/drawable/GradientDrawable.java +++ b/graphics/java/android/graphics/drawable/GradientDrawable.java @@ -133,7 +133,7 @@ public class GradientDrawable extends Drawable { private GradientState mGradientState; - private final Paint mFillPaint = new Paint(); + private final Paint mFillPaint = new Paint(Paint.ANTI_ALIAS_FLAG); private Rect mPadding; private Paint mStrokePaint; // optional, set by the caller private ColorFilter mColorFilter; // optional, set by the caller @@ -323,7 +323,7 @@ public class GradientDrawable extends Drawable { private void setStrokeInternal(int width, int color, float dashWidth, float dashGap) { if (mStrokePaint == null) { - mStrokePaint = new Paint(); + mStrokePaint = new Paint(Paint.ANTI_ALIAS_FLAG); mStrokePaint.setStyle(Paint.Style.STROKE); } mStrokePaint.setStrokeWidth(width); @@ -1802,7 +1802,7 @@ public class GradientDrawable extends Drawable { mPadding = state.mPadding; if (state.mStrokeWidth >= 0) { - mStrokePaint = new Paint(); + mStrokePaint = new Paint(Paint.ANTI_ALIAS_FLAG); mStrokePaint.setStyle(Paint.Style.STROKE); mStrokePaint.setStrokeWidth(state.mStrokeWidth); diff --git a/graphics/java/android/graphics/drawable/ShapeDrawable.java b/graphics/java/android/graphics/drawable/ShapeDrawable.java index caa0787..334b3bd 100644 --- a/graphics/java/android/graphics/drawable/ShapeDrawable.java +++ b/graphics/java/android/graphics/drawable/ShapeDrawable.java @@ -501,7 +501,7 @@ public class ShapeDrawable extends Drawable { if (mShapeState.mPaint != null) { mShapeState.mPaint = new Paint(mShapeState.mPaint); } else { - mShapeState.mPaint = new Paint(); + mShapeState.mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); } if (mShapeState.mPadding != null) { mShapeState.mPadding = new Rect(mShapeState.mPadding); @@ -555,7 +555,7 @@ public class ShapeDrawable extends Drawable { mAlpha = orig.mAlpha; mShaderFactory = orig.mShaderFactory; } else { - mPaint = new Paint(); + mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); } } |