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 коммит произвёл Facebook Github Bot
Родитель 26ed94c0fd
Коммит 14dfb525a2
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -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]);