Use ScaleType.getTransform() instead of util method

Summary: This changes ReactImageView to pull the transform matrix for rounding from the scale type itself instead of a utility method that forwards to the same thing.

Reviewed By: lambdapioneer

Differential Revision: D4326549

fbshipit-source-id: 82e59e3c20f83beb1d454743e6dbbce8666de8a3
This commit is contained in:
Kirwan Lyster 2016-12-14 07:32:35 -08:00 committed by Facebook Github Bot
parent 26ed94c0fd
commit 14dfb525a2
1 changed files with 2 additions and 3 deletions

View File

@ -87,14 +87,13 @@ public class ReactImageView extends GenericDraweeView {
private class RoundedCornerPostprocessor extends BasePostprocessor {
void getRadii(Bitmap source, float[] computedCornerRadii, float[] mappedRadii) {
ScalingUtils.getTransform(
mScaleType.getTransform(
sMatrix,
new Rect(0, 0, source.getWidth(), source.getHeight()),
source.getWidth(),
source.getHeight(),
0.0f,
0.0f,
mScaleType);
0.0f);
sMatrix.invert(sInverse);
mappedRadii[0] = sInverse.mapRadius(computedCornerRadii[0]);