RN: Revert D6701597

Reviewed By: mdvacca

Differential Revision: D6735812

fbshipit-source-id: 8144b72883150f9d7e2614ee0f238c1b8e44c6ab
This commit is contained in:
Tim Yung 2018-01-17 14:53:15 -08:00 committed by Facebook Github Bot
parent 7891805d22
commit df2f33537a
1 changed files with 4 additions and 17 deletions

View File

@ -30,7 +30,6 @@ import com.facebook.drawee.controller.BaseControllerListener;
import com.facebook.drawee.controller.ControllerListener;
import com.facebook.drawee.controller.ForwardingControllerListener;
import com.facebook.drawee.drawable.AutoRotateDrawable;
import com.facebook.drawee.drawable.RoundedColorDrawable;
import com.facebook.drawee.drawable.ScalingUtils;
import com.facebook.drawee.generic.GenericDraweeHierarchy;
import com.facebook.drawee.generic.GenericDraweeHierarchyBuilder;
@ -149,7 +148,6 @@ public class ReactImageView extends GenericDraweeView {
private @Nullable ImageSource mImageSource;
private @Nullable ImageSource mCachedImageSource;
private @Nullable Drawable mLoadingImageDrawable;
private @Nullable RoundedColorDrawable mBackgroundImageDrawable;
private int mBorderColor;
private int mOverlayColor;
private float mBorderWidth;
@ -240,12 +238,6 @@ public class ReactImageView extends GenericDraweeView {
mIsDirty = true;
}
@Override
public void setBackgroundColor(int backgroundColor) {
mBackgroundImageDrawable = new RoundedColorDrawable(backgroundColor);
mIsDirty = true;
}
public void setBorderColor(int borderColor) {
mBorderColor = borderColor;
mIsDirty = true;
@ -385,17 +377,12 @@ public class ReactImageView extends GenericDraweeView {
RoundingParams roundingParams = hierarchy.getRoundingParams();
cornerRadii(sComputedCornerRadii);
roundingParams.setCornersRadii(sComputedCornerRadii[0], sComputedCornerRadii[1], sComputedCornerRadii[2], sComputedCornerRadii[3]);
if (mBackgroundImageDrawable != null) {
mBackgroundImageDrawable.setBorder(mBorderColor, mBorderWidth);
mBackgroundImageDrawable.setRadii(roundingParams.getCornersRadii());
hierarchy.setBackgroundImage(mBackgroundImageDrawable);
}
if (usePostprocessorScaling) {
roundingParams.setCornersRadius(0);
} else {
cornerRadii(sComputedCornerRadii);
roundingParams.setCornersRadii(sComputedCornerRadii[0], sComputedCornerRadii[1], sComputedCornerRadii[2], sComputedCornerRadii[3]);
}
roundingParams.setBorder(mBorderColor, mBorderWidth);