| Index: src/effects/gradients/SkRadialGradient.cpp
|
| diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp
|
| index d175f238cd60a9ac67b97eda59fc3587f1718944..ad92b5659beae5321389f992ac3cea4cae3a65f8 100644
|
| --- a/src/effects/gradients/SkRadialGradient.cpp
|
| +++ b/src/effects/gradients/SkRadialGradient.cpp
|
| @@ -12,11 +12,11 @@
|
| namespace {
|
|
|
| // GCC doesn't like using static functions as template arguments. So force these to be non-static.
|
| -inline SkFixed mirror_tileproc_nonstatic(SkFixed x) {
|
| +inline unsigned mirror_tileproc_nonstatic(float x) {
|
| return mirror_tileproc(x);
|
| }
|
|
|
| -inline SkFixed repeat_tileproc_nonstatic(SkFixed x) {
|
| +inline unsigned repeat_tileproc_nonstatic(float x) {
|
| return repeat_tileproc(x);
|
| }
|
|
|
| @@ -159,12 +159,12 @@ void shadeSpan_radial_clamp2(SkScalar sfx, SkScalar sdx, SkScalar sfy, SkScalar
|
| // Unrolling this loop doesn't seem to help (when float); we're stalling to
|
| // get the results of the sqrt (?), and don't have enough extra registers to
|
| // have many in flight.
|
| -template <SkFixed (*TileProc)(SkFixed)>
|
| +template <unsigned (*TileProc)(float)>
|
| void shadeSpan_radial(SkScalar fx, SkScalar dx, SkScalar fy, SkScalar dy,
|
| SkPMColor* SK_RESTRICT dstC, const SkPMColor* SK_RESTRICT cache,
|
| int count, int toggle) {
|
| do {
|
| - const SkFixed dist = SkFloatToFixed(sk_float_sqrt(fx*fx + fy*fy));
|
| + const float dist = sk_float_sqrt(fx*fx + fy*fy);
|
| const unsigned fi = TileProc(dist);
|
| SkASSERT(fi <= 0xFFFF);
|
| *dstC++ = cache[toggle + (fi >> SkGradientShaderBase::kCache32Shift)];
|
| @@ -228,7 +228,7 @@ void SkRadialGradient::RadialGradientContext::shadeSpan(int x, int y,
|
| SkScalar dstY = SkIntToScalar(y);
|
| do {
|
| dstProc(fDstToIndex, dstX, dstY, &srcPt);
|
| - unsigned fi = proc(SkScalarToFixed(srcPt.length()));
|
| + unsigned fi = proc(SkScalarToFloat(srcPt.length()));
|
| SkASSERT(fi <= 0xFFFF);
|
| *dstC++ = cache[fi >> SkGradientShaderBase::kCache32Shift];
|
| dstX += SK_Scalar1;
|
|
|