diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-28 20:20:54 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-28 20:20:54 +0000 |
commit | c01ba70afc1ef3f08997cf72ddc30444298ecb9e (patch) | |
tree | fd2c14168f337ef899ee72eec5c46ac5061343c6 /src | |
parent | 2d3a7897e55a76a4dc9f27ae865d1d230163f584 (diff) |
Remove float/double conversions from SkMatrix44's map2_pf
BUG=chromium:303811
R=reed@google.com
Author: enne@chromium.org
Review URL: https://codereview.chromium.org/37693004
git-svn-id: http://skia.googlecode.com/svn/trunk@11986 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/SkMatrix44.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/utils/SkMatrix44.cpp b/src/utils/SkMatrix44.cpp index c9247235db..a598e523f1 100644 --- a/src/utils/SkMatrix44.cpp +++ b/src/utils/SkMatrix44.cpp @@ -815,13 +815,11 @@ static void map2_ad(const SkMScalar mat[][4], const double* SK_RESTRICT src2, static void map2_pf(const SkMScalar mat[][4], const float* SK_RESTRICT src2, int count, float* SK_RESTRICT dst4) { - double r; for (int n = 0; n < count; ++n) { - double sx = src2[0]; - double sy = src2[1]; + float sx = src2[0]; + float sy = src2[1]; for (int i = 0; i < 4; i++) { - r = mat[0][i] * sx + mat[1][i] * sy + mat[3][i]; - dst4[i] = SkMScalarToFloat(r); + dst4[i] = mat[0][i] * sx + mat[1][i] * sy + mat[3][i]; } src2 += 2; dst4 += 4; |