diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-11 19:56:20 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-11 19:56:20 +0000 |
commit | e182829f491efa1d0d217973e81c0693fbbc1338 (patch) | |
tree | 5f428e36860ae2b65b03547b439b45cd8e317da3 /src/opts | |
parent | b15e6061c69995530b310f4ca12354ff250071e5 (diff) |
mirror of https://codereview.appspot.com/7312060/
git-svn-id: http://skia.googlecode.com/svn/trunk@7694 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/opts')
-rw-r--r-- | src/opts/SkBitmapProcState_matrix_repeat_neon.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/opts/SkBitmapProcState_matrix_repeat_neon.h b/src/opts/SkBitmapProcState_matrix_repeat_neon.h index a0eb0a9e84..f57d20d35c 100644 --- a/src/opts/SkBitmapProcState_matrix_repeat_neon.h +++ b/src/opts/SkBitmapProcState_matrix_repeat_neon.h @@ -417,8 +417,8 @@ static void SCALE_FILTER_NAME(const SkBitmapProcState& s, const unsigned maxX = s.fBitmap->width() - 1; const SkFixed one = s.fFilterOneX; - const SkFixed dx = s.fInvSx; - SkFixed fx; + const SkFractionalInt dx = s.fInvSxFractionalInt; + SkFractionalInt fx; { SkPoint pt; @@ -429,20 +429,20 @@ static void SCALE_FILTER_NAME(const SkBitmapProcState& s, // compute our two Y values up front *xy++ = PACK_FILTER_Y_NAME(fy, maxY, s.fFilterOneY PREAMBLE_ARG_Y); // now initialize fx - fx = SkScalarToFixed(pt.fX) - (one >> 1); + fx = SkScalarToFractionalInt(pt.fX) - (SkFixedToFractionalInt(one) >> 1); } #ifdef CHECK_FOR_DECAL // test if we don't need to apply the tile proc - if (dx > 0 && - (unsigned)(fx >> 16) <= maxX && - (unsigned)((fx + dx * (count - 1)) >> 16) < maxX) { - decal_filter_scale_neon(xy, fx, dx, count); + if (can_truncate_to_fixed_for_decal(fx, dx, count, maxX)) { + decal_filter_scale_neon(xy, SkFractionalIntToFixed(fx), + SkFractionalIntToFixed(dx), count); } else #endif { do { - *xy++ = PACK_FILTER_X_NAME(fx, maxX, one PREAMBLE_ARG_X); + SkFixed fixedFx = SkFractionalIntToFixed(fx); + *xy++ = PACK_FILTER_X_NAME(fixedFx, maxX, one PREAMBLE_ARG_X); fx += dx; } while (--count != 0); } |