From aee1ae9e92c505e6a49a12db6deb0b72b29868a6 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Sat, 1 Aug 2020 13:26:35 -0700 Subject: [PATCH] EZ refactor in ReactViewBackgroundDrawable Summary: EZ refactor in ReactViewBackgroundDrawable to remove an unnecessary class variable changelog: [internal] Internal Reviewed By: RSNara Differential Revision: D22874851 fbshipit-source-id: 16808809b196cba0dab5c9972359d7786939a7ce --- .../react/views/view/ReactViewBackgroundDrawable.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java index 8b877ba252e..18b8d6b6845 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java @@ -86,8 +86,6 @@ public class ReactViewBackgroundDrawable extends Drawable { private @Nullable Spacing mBorderAlpha; private @Nullable BorderStyle mBorderStyle; - /* Used for rounded border and rounded background */ - private @Nullable PathEffect mPathEffectForBorderStyle; private @Nullable Path mInnerClipPathForBorderRadius; private @Nullable Path mOuterClipPathForBorderRadius; private @Nullable Path mPathForBorderRadiusOutline; @@ -970,7 +968,8 @@ public class ReactViewBackgroundDrawable extends Drawable { /** Set type of border */ private void updatePathEffect() { - mPathEffectForBorderStyle = + // Used for rounded border and rounded background + PathEffect mPathEffectForBorderStyle = mBorderStyle != null ? BorderStyle.getPathEffect(mBorderStyle, getFullBorderWidth()) : null; mPaint.setPathEffect(mPathEffectForBorderStyle);