remove SkFloatToScalar macro

BUG=
R=reed@google.com, djsollen@google.com

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/85463005

git-svn-id: http://skia.googlecode.com/svn/trunk/src@12385 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/core/SkBBoxRecord.cpp b/core/SkBBoxRecord.cpp
index 2349b1c..cdb70bb 100644
--- a/core/SkBBoxRecord.cpp
+++ b/core/SkBBoxRecord.cpp
@@ -53,7 +53,7 @@
     // Note: The device coordinate outset in SkBBoxHierarchyRecord::handleBBox is currently
     // done in the recording coordinate space, which is wrong.
     // http://code.google.com/p/skia/issues/detail?id=1021
-    static const SkScalar kMinWidth = SkFloatToScalar(0.01f);
+    static const SkScalar kMinWidth = 0.01f;
     SkScalar halfStrokeWidth = SkMaxScalar(paint.getStrokeWidth(), kMinWidth) / 2;
     bbox.outset(halfStrokeWidth, halfStrokeWidth);
     if (this->transformBounds(bbox, &paint)) {
diff --git a/core/SkBitmapFilter.cpp b/core/SkBitmapFilter.cpp
index c607e68..f066625 100644
--- a/core/SkBitmapFilter.cpp
+++ b/core/SkBitmapFilter.cpp
@@ -31,8 +31,8 @@
 
     while (count-- > 0) {
         SkPoint srcPt;
-        s.fInvProc(s.fInvMatrix, SkFloatToScalar(x + 0.5f),
-                    SkFloatToScalar(y + 0.5f), &srcPt);
+        s.fInvProc(s.fInvMatrix, x + 0.5f,
+                    y + 0.5f, &srcPt);
         srcPt.fX -= SK_ScalarHalf;
         srcPt.fY -= SK_ScalarHalf;
 
diff --git a/core/SkBitmapFilter.h b/core/SkBitmapFilter.h
index 0b8483a..8ef0f6e 100644
--- a/core/SkBitmapFilter.h
+++ b/core/SkBitmapFilter.h
@@ -67,7 +67,7 @@
           for (int x = 0; x < SKBITMAP_FILTER_TABLE_SIZE; ++x) {
               float fx = ((float)x + .5f) * this->width() / SKBITMAP_FILTER_TABLE_SIZE;
               float filter_value = evaluate(fx);
-              *ftpScalar++ = SkFloatToScalar(filter_value);
+              *ftpScalar++ = filter_value;
               *ftp++ = SkFloatToFixed(filter_value);
           }
       }
diff --git a/core/SkBitmapProcState.cpp b/core/SkBitmapProcState.cpp
index a535f08..59483d6 100644
--- a/core/SkBitmapProcState.cpp
+++ b/core/SkBitmapProcState.cpp
@@ -198,7 +198,7 @@
         // so we only keep High quality if the scale is greater than this.
         //
         // Since we're dealing with the inverse, we compare against its inverse.
-        const SkScalar bicubicLimit = SkFloatToScalar(4.0f);
+        const SkScalar bicubicLimit = 4.0f;
         const SkScalar bicubicLimitSqd = bicubicLimit * bicubicLimit;
         if (scaleSqd < bicubicLimitSqd) {  // use bicubic scanline
             return false;
diff --git a/core/SkFDot6.h b/core/SkFDot6.h
index a88ea92..afb369e 100644
--- a/core/SkFDot6.h
+++ b/core/SkFDot6.h
@@ -41,7 +41,7 @@
 
 #ifdef SK_SCALAR_IS_FLOAT
     #define SkScalarToFDot6(x)  (SkFDot6)((x) * 64)
-    #define SkFDot6ToScalar(x)  ((SkScalar)(x) * SkFloatToScalar(0.015625f))
+    #define SkFDot6ToScalar(x)  ((SkScalar)(x) * 0.015625f)
 #else
     #define SkScalarToFDot6(x)  ((x) >> 10)
     #define SkFDot6ToScalar(x)  ((x) << 10)
diff --git a/core/SkGeometry.cpp b/core/SkGeometry.cpp
index 9b15f9f..11d52b5 100644
--- a/core/SkGeometry.cpp
+++ b/core/SkGeometry.cpp
@@ -1134,9 +1134,9 @@
     // instead of down
     if (cubic[3].fY > cubic[0].fY) {
         upper_t = SK_Scalar1;
-        lower_t = SkFloatToScalar(0);
+        lower_t = 0;
     } else {
-        upper_t = SkFloatToScalar(0);
+        upper_t = 0;
         lower_t = SK_Scalar1;
     }
     do {
diff --git a/core/SkLineClipper.cpp b/core/SkLineClipper.cpp
index fc4e3d2..911cd97 100644
--- a/core/SkLineClipper.cpp
+++ b/core/SkLineClipper.cpp
@@ -176,7 +176,7 @@
 static void sect_with_horizontal_test_for_pin_results() {
     const SkPoint pts[] = {
         { -540000,    -720000 },
-        { SkFloatToScalar(-9.10000017e-05f), SkFloatToScalar(9.99999996e-13f) }
+        { -9.10000017e-05f, 9.99999996e-13f }
     };
     float x = sect_with_horizontal(pts, 0);
     SkASSERT(is_between_unsorted(x, pts[0].fX, pts[1].fX));
diff --git a/core/SkMaskGamma.cpp b/core/SkMaskGamma.cpp
index 9066fb7..a305d72 100644
--- a/core/SkMaskGamma.cpp
+++ b/core/SkMaskGamma.cpp
@@ -36,21 +36,21 @@
         SkASSERT(0 == gamma);
         //The magic numbers are derived from the sRGB specification.
         //See http://www.color.org/chardata/rgb/srgb.xalter .
-        if (luminance <= SkFloatToScalar(0.04045f)) {
-            return luminance / SkFloatToScalar(12.92f);
+        if (luminance <= 0.04045f) {
+            return luminance / 12.92f;
         }
-        return SkScalarPow((luminance + SkFloatToScalar(0.055f)) / SkFloatToScalar(1.055f),
-                        SkFloatToScalar(2.4f));
+        return SkScalarPow((luminance + 0.055f) / 1.055f,
+                        2.4f);
     }
     virtual SkScalar fromLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luma) const SK_OVERRIDE {
         SkASSERT(0 == gamma);
         //The magic numbers are derived from the sRGB specification.
         //See http://www.color.org/chardata/rgb/srgb.xalter .
-        if (luma <= SkFloatToScalar(0.0031308f)) {
-            return luma * SkFloatToScalar(12.92f);
+        if (luma <= 0.0031308f) {
+            return luma * 12.92f;
         }
-        return SkFloatToScalar(1.055f) * SkScalarPow(luma, SkScalarInvert(SkFloatToScalar(2.4f)))
-               - SkFloatToScalar(0.055f);
+        return 1.055f * SkScalarPow(luma, SkScalarInvert(2.4f))
+               - 0.055f;
     }
 };
 
diff --git a/core/SkMaskGamma.h b/core/SkMaskGamma.h
index fafe4ac..9d3fd9a 100644
--- a/core/SkMaskGamma.h
+++ b/core/SkMaskGamma.h
@@ -35,9 +35,9 @@
         SkScalar r = luminance.toLuma(gamma, SkIntToScalar(SkColorGetR(c)) / 255);
         SkScalar g = luminance.toLuma(gamma, SkIntToScalar(SkColorGetG(c)) / 255);
         SkScalar b = luminance.toLuma(gamma, SkIntToScalar(SkColorGetB(c)) / 255);
-        SkScalar luma = r * SkFloatToScalar(SK_LUM_COEFF_R) +
-                        g * SkFloatToScalar(SK_LUM_COEFF_G) +
-                        b * SkFloatToScalar(SK_LUM_COEFF_B);
+        SkScalar luma = r * SK_LUM_COEFF_R +
+                        g * SK_LUM_COEFF_G +
+                        b * SK_LUM_COEFF_B;
         SkASSERT(luma <= SK_Scalar1);
         return SkScalarRoundToInt(luminance.fromLuma(gamma, luma) * 255);
     }
diff --git a/core/SkPaint.cpp b/core/SkPaint.cpp
index 6c6f0e6..d6948dd 100644
--- a/core/SkPaint.cpp
+++ b/core/SkPaint.cpp
@@ -1696,7 +1696,7 @@
      * With higher values lcd fringing is worse and the smoothing effect of
      * partial coverage is diminished.
      */
-    rec->setContrast(SkFloatToScalar(0.5f));
+    rec->setContrast(0.5f);
 #endif
 
     rec->fReservedAlign = 0;
diff --git a/effects/SkBicubicImageFilter.cpp b/effects/SkBicubicImageFilter.cpp
index d667415..5148e13 100644
--- a/effects/SkBicubicImageFilter.cpp
+++ b/effects/SkBicubicImageFilter.cpp
@@ -115,7 +115,7 @@
     src.getBounds(&srcRect);
     SkMatrix inverse;
     inverse.setRectToRect(dstRect, srcRect, SkMatrix::kFill_ScaleToFit);
-    inverse.postTranslate(SkFloatToScalar(-0.5f), SkFloatToScalar(-0.5f));
+    inverse.postTranslate(-0.5f, -0.5f);
 
     for (int y = dstIRect.fTop; y < dstIRect.fBottom; ++y) {
         SkPMColor* dptr = result->getAddr32(dstIRect.fLeft, y);
diff --git a/effects/SkBlurMask.cpp b/effects/SkBlurMask.cpp
index 97a6234..d2484c8 100644
--- a/effects/SkBlurMask.cpp
+++ b/effects/SkBlurMask.cpp
@@ -21,7 +21,7 @@
     // Firefox used to do the same too, until 4.0 where they fixed it.  So at some
     // point we should probably get rid of these scaling constants and rebaseline
     // all the blur tests.
-    static const SkScalar kBLUR_SIGMA_SCALE = SkFloatToScalar(0.57735f);
+    static const SkScalar kBLUR_SIGMA_SCALE = 0.57735f;
 
     return radius ? kBLUR_SIGMA_SCALE * radius + 0.5f : 0.0f;
 }
@@ -405,7 +405,7 @@
 static void get_adjusted_radii(SkScalar passRadius, int *loRadius, int *hiRadius)
 {
     *loRadius = *hiRadius = SkScalarCeil(passRadius);
-    if (SkIntToScalar(*hiRadius) - passRadius > SkFloatToScalar(0.5f)) {
+    if (SkIntToScalar(*hiRadius) - passRadius > 0.5f) {
         *loRadius = *hiRadius - 1;
     }
 }
diff --git a/effects/SkBlurMaskFilter.cpp b/effects/SkBlurMaskFilter.cpp
index 34dde3c..9ed6d0c 100644
--- a/effects/SkBlurMaskFilter.cpp
+++ b/effects/SkBlurMaskFilter.cpp
@@ -540,8 +540,8 @@
     SkRect srcRect(srcBounds);
 
     // Outset srcRect and clipRect by 3 * sigma, to compute affected blur area.
-    srcRect.outset(SkFloatToScalar(sigma3), SkFloatToScalar(sigma3));
-    clipRect.outset(SkFloatToScalar(sigma3), SkFloatToScalar(sigma3));
+    srcRect.outset(sigma3, sigma3);
+    clipRect.outset(sigma3, sigma3);
     srcRect.intersect(clipRect);
     *maskRect = srcRect;
     return true;
diff --git a/effects/SkColorMatrix.cpp b/effects/SkColorMatrix.cpp
index d6cb940..535d6cc 100644
--- a/effects/SkColorMatrix.cpp
+++ b/effects/SkColorMatrix.cpp
@@ -108,9 +108,9 @@
     row[2] = b;
 }
 
-static const SkScalar kHueR = SkFloatToScalar(0.213f);
-static const SkScalar kHueG = SkFloatToScalar(0.715f);
-static const SkScalar kHueB = SkFloatToScalar(0.072f);
+static const SkScalar kHueR = 0.213f;
+static const SkScalar kHueG = 0.715f;
+static const SkScalar kHueB = 0.072f;
 
 void SkColorMatrix::setSaturation(SkScalar sat) {
     memset(fMat, 0, sizeof(fMat));
@@ -125,17 +125,17 @@
     fMat[18] = SK_Scalar1;
 }
 
-static const SkScalar kR2Y = SkFloatToScalar(0.299f);
-static const SkScalar kG2Y = SkFloatToScalar(0.587f);
-static const SkScalar kB2Y = SkFloatToScalar(0.114f);
+static const SkScalar kR2Y = 0.299f;
+static const SkScalar kG2Y = 0.587f;
+static const SkScalar kB2Y = 0.114f;
 
-static const SkScalar kR2U = SkFloatToScalar(-0.16874f);
-static const SkScalar kG2U = SkFloatToScalar(-0.33126f);
-static const SkScalar kB2U = SkFloatToScalar(0.5f);
+static const SkScalar kR2U = -0.16874f;
+static const SkScalar kG2U = -0.33126f;
+static const SkScalar kB2U = 0.5f;
 
-static const SkScalar kR2V = SkFloatToScalar(0.5f);
-static const SkScalar kG2V = SkFloatToScalar(-0.41869f);
-static const SkScalar kB2V = SkFloatToScalar(-0.08131f);
+static const SkScalar kR2V = 0.5f;
+static const SkScalar kG2V = -0.41869f;
+static const SkScalar kB2V = -0.08131f;
 
 void SkColorMatrix::setRGB2YUV() {
     memset(fMat, 0, sizeof(fMat));
@@ -146,10 +146,10 @@
     fMat[18] = SK_Scalar1;
 }
 
-static const SkScalar kV2R = SkFloatToScalar(1.402f);
-static const SkScalar kU2G = SkFloatToScalar(-0.34414f);
-static const SkScalar kV2G = SkFloatToScalar(-0.71414f);
-static const SkScalar kU2B = SkFloatToScalar(1.772f);
+static const SkScalar kV2R = 1.402f;
+static const SkScalar kU2G = -0.34414f;
+static const SkScalar kV2G = -0.71414f;
+static const SkScalar kU2B = 1.772f;
 
 void SkColorMatrix::setYUV2RGB() {
     memset(fMat, 0, sizeof(fMat));
diff --git a/effects/SkDisplacementMapEffect.cpp b/effects/SkDisplacementMapEffect.cpp
index 15ac627..816807d 100644
--- a/effects/SkDisplacementMapEffect.cpp
+++ b/effects/SkDisplacementMapEffect.cpp
@@ -49,7 +49,7 @@
          SkDisplacementMapEffect::ChannelSelectorType typeY>
 void computeDisplacement(SkScalar scale, SkBitmap* dst, SkBitmap* displ, SkBitmap* src, const SkIRect& bounds)
 {
-    static const SkScalar Inv8bit = SkScalarDiv(SK_Scalar1, SkFloatToScalar(255.0f));
+    static const SkScalar Inv8bit = SkScalarDiv(SK_Scalar1, 255.0f);
     const int srcW = src->width();
     const int srcH = src->height();
     const SkScalar scaleForColor = SkScalarMul(scale, Inv8bit);
@@ -413,7 +413,7 @@
     SkDisplacementMapEffect::ChannelSelectorType yChannelSelector =
         static_cast<SkDisplacementMapEffect::ChannelSelectorType>(
         random->nextRangeU(1, kMaxComponent));
-    SkScalar scale = random->nextRangeScalar(0, SkFloatToScalar(100.0f));
+    SkScalar scale = random->nextRangeScalar(0, 100.0f);
 
     return GrDisplacementMapEffect::Create(xChannelSelector, yChannelSelector, scale,
                                            textures[texIdxDispl], textures[texIdxColor]);
diff --git a/effects/SkGpuBlurUtils.cpp b/effects/SkGpuBlurUtils.cpp
index 6188c49..02fdf48 100644
--- a/effects/SkGpuBlurUtils.cpp
+++ b/effects/SkGpuBlurUtils.cpp
@@ -22,10 +22,10 @@
 #define MAX_BLUR_SIGMA 4.0f
 
 static void scale_rect(SkRect* rect, float xScale, float yScale) {
-    rect->fLeft   = SkScalarMul(rect->fLeft,   SkFloatToScalar(xScale));
-    rect->fTop    = SkScalarMul(rect->fTop,    SkFloatToScalar(yScale));
-    rect->fRight  = SkScalarMul(rect->fRight,  SkFloatToScalar(xScale));
-    rect->fBottom = SkScalarMul(rect->fBottom, SkFloatToScalar(yScale));
+    rect->fLeft   = SkScalarMul(rect->fLeft,   xScale);
+    rect->fTop    = SkScalarMul(rect->fTop,    yScale);
+    rect->fRight  = SkScalarMul(rect->fRight,  xScale);
+    rect->fBottom = SkScalarMul(rect->fBottom, yScale);
 }
 
 static float adjust_sigma(float sigma, int *scaleFactor, int *radius) {
diff --git a/effects/SkLightingImageFilter.cpp b/effects/SkLightingImageFilter.cpp
index db3a1a0..45a75ab 100644
--- a/effects/SkLightingImageFilter.cpp
+++ b/effects/SkLightingImageFilter.cpp
@@ -30,8 +30,8 @@
 
 const SkScalar gOneThird = SkScalarInvert(SkIntToScalar(3));
 const SkScalar gTwoThirds = SkScalarDiv(SkIntToScalar(2), SkIntToScalar(3));
-const SkScalar gOneHalf = SkFloatToScalar(0.5f);
-const SkScalar gOneQuarter = SkFloatToScalar(0.25f);
+const SkScalar gOneHalf = 0.5f;
+const SkScalar gOneQuarter = 0.25f;
 
 #if SK_SUPPORT_GPU
 void setUniformPoint3(const GrGLUniformManager& uman, UniformHandle uni, const SkPoint3& point) {
@@ -675,7 +675,7 @@
        fS = target - location;
        fS.normalize();
        fCosOuterConeAngle = SkScalarCos(SkDegreesToRadians(cutoffAngle));
-       const SkScalar antiAliasThreshold = SkFloatToScalar(0.016f);
+       const SkScalar antiAliasThreshold = 0.016f;
        fCosInnerConeAngle = fCosOuterConeAngle + antiAliasThreshold;
        fConeScale = SkScalarInvert(antiAliasThreshold);
     }
@@ -791,8 +791,8 @@
 
 // According to the spec, the specular term should be in the range [1, 128] :
 // http://www.w3.org/TR/SVG/filters.html#feSpecularLightingSpecularExponentAttribute
-const SkScalar SkSpotLight::kSpecularExponentMin = SkFloatToScalar(1.0f);
-const SkScalar SkSpotLight::kSpecularExponentMax = SkFloatToScalar(128.0f);
+const SkScalar SkSpotLight::kSpecularExponentMin = 1.0f;
+const SkScalar SkSpotLight::kSpecularExponentMax = 128.0f;
 
 ///////////////////////////////////////////////////////////////////////////////
 
diff --git a/effects/SkPerlinNoiseShader.cpp b/effects/SkPerlinNoiseShader.cpp
index f2ce679..51675ad 100644
--- a/effects/SkPerlinNoiseShader.cpp
+++ b/effects/SkPerlinNoiseShader.cpp
@@ -45,7 +45,7 @@
 }
 
 inline SkScalar smoothCurve(SkScalar t) {
-    static const SkScalar SK_Scalar3 = SkFloatToScalar(3.0f);
+    static const SkScalar SK_Scalar3 = 3.0f;
 
     // returns t * t * (3 - 2 * t)
     return SkScalarMul(SkScalarSquare(t), SK_Scalar3 - 2 * t);
@@ -165,7 +165,7 @@
         }
 
         // Half of the largest possible value for 16 bit unsigned int
-        static const SkScalar gHalfMax16bits = SkFloatToScalar(32767.5f);
+        static const SkScalar gHalfMax16bits = 32767.5f;
 
         // Compute gradients from permutated noise data
         for (int channel = 0; channel < 4; ++channel) {
@@ -729,10 +729,10 @@
     bool     stitchTiles = random->nextBool();
     SkScalar seed = SkIntToScalar(random->nextU());
     SkISize  tileSize = SkISize::Make(random->nextRangeU(4, 4096), random->nextRangeU(4, 4096));
-    SkScalar baseFrequencyX = random->nextRangeScalar(SkFloatToScalar(0.01f),
-                                                      SkFloatToScalar(0.99f));
-    SkScalar baseFrequencyY = random->nextRangeScalar(SkFloatToScalar(0.01f),
-                                                      SkFloatToScalar(0.99f));
+    SkScalar baseFrequencyX = random->nextRangeScalar(0.01f,
+                                                      0.99f);
+    SkScalar baseFrequencyY = random->nextRangeScalar(0.01f,
+                                                      0.99f);
 
     SkShader* shader = random->nextBool() ?
         SkPerlinNoiseShader::CreateFractalNoise(baseFrequencyX, baseFrequencyY, numOctaves, seed,
diff --git a/gpu/GrAAHairLinePathRenderer.cpp b/gpu/GrAAHairLinePathRenderer.cpp
index 3956310..2b5428c 100644
--- a/gpu/GrAAHairLinePathRenderer.cpp
+++ b/gpu/GrAAHairLinePathRenderer.cpp
@@ -762,7 +762,7 @@
         add_line(&lines[2*i], toSrc, drawState->getCoverageColor(), &verts);
     }
     // All the verts computed by add_line are within sqrt(1^2 + 0.5^2) of the end points.
-    static const SkScalar kSqrtOfOneAndAQuarter = SkFloatToScalar(1.118f);
+    static const SkScalar kSqrtOfOneAndAQuarter = 1.118f;
     // Add a little extra to account for vector normalization precision.
     static const SkScalar kOutset = kSqrtOfOneAndAQuarter + SK_Scalar1 / 20;
     devBounds->outset(kOutset, kOutset);
diff --git a/gpu/GrEffect.cpp b/gpu/GrEffect.cpp
index 1ada34f..a64fd7c 100644
--- a/gpu/GrEffect.cpp
+++ b/gpu/GrEffect.cpp
@@ -33,8 +33,8 @@
         gMatrices[3].postTranslate(SkIntToScalar(66), SkIntToScalar(-33));
         gMatrices[3].postScale(SkIntToScalar(2), SK_ScalarHalf);
         gMatrices[4].setRotate(SkIntToScalar(215));
-        gMatrices[4].set(SkMatrix::kMPersp0, SkFloatToScalar(0.00013f));
-        gMatrices[4].set(SkMatrix::kMPersp1, SkFloatToScalar(-0.000039f));
+        gMatrices[4].set(SkMatrix::kMPersp0, 0.00013f);
+        gMatrices[4].set(SkMatrix::kMPersp1, -0.000039f);
         gOnce = true;
     }
     return gMatrices[random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(gMatrices)))];
diff --git a/gpu/GrPathUtils.cpp b/gpu/GrPathUtils.cpp
index d412b8c..81348ec 100644
--- a/gpu/GrPathUtils.cpp
+++ b/gpu/GrPathUtils.cpp
@@ -34,7 +34,7 @@
 }
 
 static const int MAX_POINTS_PER_CURVE = 1 << 10;
-static const SkScalar gMinCurveTol = SkFloatToScalar(0.0001f);
+static const SkScalar gMinCurveTol = 0.0001f;
 
 uint32_t GrPathUtils::quadraticPointCount(const GrPoint points[],
                                           SkScalar tol) {
@@ -250,7 +250,7 @@
         m.postConcat(UVpts);
 
         // The matrix should not have perspective.
-        SkDEBUGCODE(static const SkScalar gTOL = SkFloatToScalar(1.f / 100.f));
+        SkDEBUGCODE(static const SkScalar gTOL = 1.f / 100.f);
         SkASSERT(SkScalarAbs(m.get(SkMatrix::kMPersp0)) < gTOL);
         SkASSERT(SkScalarAbs(m.get(SkMatrix::kMPersp1)) < gTOL);
 
diff --git a/gpu/SkGpuDevice.cpp b/gpu/SkGpuDevice.cpp
index c6194e7..6fb1403 100644
--- a/gpu/SkGpuDevice.cpp
+++ b/gpu/SkGpuDevice.cpp
@@ -45,7 +45,7 @@
 // This constant represents the screen alignment criterion in texels for
 // requiring texture domain clamping to prevent color bleeding when drawing
 // a sub region of a larger source image.
-#define COLOR_BLEED_TOLERANCE SkFloatToScalar(0.001f)
+#define COLOR_BLEED_TOLERANCE 0.001f
 
 #define DO_DEFERRED_CLEAR()             \
     do {                                \
diff --git a/pdf/SkPDFDevice.cpp b/pdf/SkPDFDevice.cpp
index 804dc41..bdabc53 100644
--- a/pdf/SkPDFDevice.cpp
+++ b/pdf/SkPDFDevice.cpp
@@ -745,7 +745,7 @@
       fLastMarginContentEntry(NULL),
       fClipStack(NULL),
       fEncoder(NULL),
-      fRasterDpi(SkFloatToScalar(72.0f)) {
+      fRasterDpi(72.0f) {
     // Just report that PDF does not supports perspective in the
     // initial transform.
     NOT_IMPLEMENTED(initialTransform.hasPerspective(), true);
@@ -776,7 +776,7 @@
       fLastMarginContentEntry(NULL),
       fClipStack(NULL),
       fEncoder(NULL),
-      fRasterDpi(SkFloatToScalar(72.0f)) {
+      fRasterDpi(72.0f) {
     fInitialTransform.reset();
     this->init();
 }
diff --git a/pdf/SkPDFImage.cpp b/pdf/SkPDFImage.cpp
index 37fff81..81adcc2 100644
--- a/pdf/SkPDFImage.cpp
+++ b/pdf/SkPDFImage.cpp
@@ -556,9 +556,9 @@
         SkASSERT(!isAlpha);
         SkAutoTUnref<SkPDFInt> zeroVal(new SkPDFInt(0));
         SkAutoTUnref<SkPDFScalar> scale5Val(
-                new SkPDFScalar(SkFloatToScalar(8.2258f)));  // 255/2^5-1
+                new SkPDFScalar(8.2258f));  // 255/2^5-1
         SkAutoTUnref<SkPDFScalar> scale6Val(
-                new SkPDFScalar(SkFloatToScalar(4.0476f)));  // 255/2^6-1
+                new SkPDFScalar(4.0476f));  // 255/2^6-1
         SkAutoTUnref<SkPDFArray> decodeValue(new SkPDFArray());
         decodeValue->reserve(6);
         decodeValue->append(zeroVal.get());
diff --git a/ports/SkFontHost_mac.cpp b/ports/SkFontHost_mac.cpp
index 1d2f1fa..3c1a274 100755
--- a/ports/SkFontHost_mac.cpp
+++ b/ports/SkFontHost_mac.cpp
@@ -273,7 +273,7 @@
 
 static SkScalar CGToScalar(CGFloat cgFloat) {
     if (sizeof(CGFloat) == sizeof(float)) {
-        return SkFloatToScalar(cgFloat);
+        return cgFloat;
     } else {
         SkASSERT(sizeof(CGFloat) == sizeof(double));
         return SkDoubleToScalar(cgFloat);
@@ -1075,7 +1075,7 @@
     for (int i = 0; i < 256; i++) {
         float x = i / 255.f;
         x = sk_float_pow(x, ee);
-        int xx = SkScalarRoundToInt(SkFloatToScalar(x * 255));
+        int xx = SkScalarRoundToInt(x * 255);
         table[i] = SkToU8(xx);
     }
 }
@@ -1325,7 +1325,7 @@
         fRec.getSingleMatrix(&m);
 
         // start out by assuming that we want no hining in X and Y
-        scaleX = scaleY = SkFloatToScalar(kScaleForSubPixelPositionHinting);
+        scaleX = scaleY = kScaleForSubPixelPositionHinting;
         // now see if we need to restore hinting for axis-aligned baselines
         switch (SkComputeAxisAlignmentForHText(m)) {
             case kX_SkAxisAlignment:
diff --git a/ports/SkFontHost_win.cpp b/ports/SkFontHost_win.cpp
index 0aad4f8..aee2b86 100755
--- a/ports/SkFontHost_win.cpp
+++ b/ports/SkFontHost_win.cpp
@@ -1065,7 +1065,7 @@
     for (int i = 0; i < 256; i++) {
         float x = i / 255.f;
         x = sk_float_pow(x, ee);
-        int xx = SkScalarRound(SkFloatToScalar(x * 255));
+        int xx = SkScalarRound(x * 255);
         table[i] = SkToU8(xx);
     }
 }
diff --git a/ports/SkFontHost_win_dw.cpp b/ports/SkFontHost_win_dw.cpp
index a3d1d17..89e85b7 100644
--- a/ports/SkFontHost_win_dw.cpp
+++ b/ports/SkFontHost_win_dw.cpp
@@ -1378,10 +1378,10 @@
         SkTScopedComPtr<IDWriteRenderingParams> defaultRenderingParams;
         if (SUCCEEDED(factory->CreateRenderingParams(&defaultRenderingParams))) {
             float gamma = defaultRenderingParams->GetGamma();
-            rec->setDeviceGamma(SkFloatToScalar(gamma));
-            rec->setPaintGamma(SkFloatToScalar(gamma));
+            rec->setDeviceGamma(gamma);
+            rec->setPaintGamma(gamma);
 
-            rec->setContrast(SkFloatToScalar(defaultRenderingParams->GetEnhancedContrast()));
+            rec->setContrast(defaultRenderingParams->GetEnhancedContrast());
         }
     }
 #endif
diff --git a/utils/SkCamera.cpp b/utils/SkCamera.cpp
index a7c0b14..f5b51d5 100644
--- a/utils/SkCamera.cpp
+++ b/utils/SkCamera.cpp
@@ -365,23 +365,23 @@
 #ifdef SK_BUILD_FOR_ANDROID
 void Sk3DView::setCameraLocation(SkScalar x, SkScalar y, SkScalar z) {
     // the camera location is passed in inches, set in pt
-    SkScalar lz = z * SkFloatToScalar(72.0f);
-    fCamera.fLocation.set(x * SkFloatToScalar(72.0f), y * SkFloatToScalar(72.0f), lz);
+    SkScalar lz = z * 72.0f;
+    fCamera.fLocation.set(x * 72.0f, y * 72.0f, lz);
     fCamera.fObserver.set(0, 0, lz);
     fCamera.update();
 
 }
 
 SkScalar Sk3DView::getCameraLocationX() {
-    return fCamera.fLocation.fX / SkFloatToScalar(72.0f);
+    return fCamera.fLocation.fX / 72.0f;
 }
 
 SkScalar Sk3DView::getCameraLocationY() {
-    return fCamera.fLocation.fY / SkFloatToScalar(72.0f);
+    return fCamera.fLocation.fY / 72.0f;
 }
 
 SkScalar Sk3DView::getCameraLocationZ() {
-    return fCamera.fLocation.fZ / SkFloatToScalar(72.0f);
+    return fCamera.fLocation.fZ / 72.0f;
 }
 #endif
 
diff --git a/utils/SkPathUtils.cpp b/utils/SkPathUtils.cpp
index 86b2f10..fdca09a 100644
--- a/utils/SkPathUtils.cpp
+++ b/utils/SkPathUtils.cpp
@@ -55,7 +55,7 @@
         if (GetBit(line,i)) {
             path->addCircle(i + SK_ScalarHalf,
                             lineIdx + SK_ScalarHalf,
-                            SkFloatToScalar(SQRT_2 / 2.0f));
+                            SQRT_2 / 2.0f);
         }
     }
 }
diff --git a/utils/win/SkDWriteGeometrySink.cpp b/utils/win/SkDWriteGeometrySink.cpp
index a12b514..b7ef88b 100644
--- a/utils/win/SkDWriteGeometrySink.cpp
+++ b/utils/win/SkDWriteGeometrySink.cpp
@@ -65,7 +65,7 @@
 }
 
 void STDMETHODCALLTYPE SkDWriteGeometrySink::BeginFigure(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin) {
-    fPath->moveTo(SkFloatToScalar(startPoint.x), SkFloatToScalar(startPoint.y));
+    fPath->moveTo(startPoint.x, startPoint.y);
     if (figureBegin == D2D1_FIGURE_BEGIN_HOLLOW) {
         SkDEBUGFAIL("Invalid D2D1_FIGURE_BEGIN value.");
     }
@@ -73,7 +73,7 @@
 
 void STDMETHODCALLTYPE SkDWriteGeometrySink::AddLines(const D2D1_POINT_2F *points, UINT pointsCount) {
     for (const D2D1_POINT_2F *end = &points[pointsCount]; points < end; ++points) {
-        fPath->lineTo(SkFloatToScalar(points->x), SkFloatToScalar(points->y));
+        fPath->lineTo(points->x, points->y);
     }
 }
 
@@ -121,12 +121,12 @@
                         { beziers->point3.x, beziers->point3.y }, };
         Quadratic quadratic;
         if (check_quadratic(cubic, quadratic)) {
-            fPath->quadTo(SkFloatToScalar(quadratic[1].x), SkFloatToScalar(quadratic[1].y),
-                          SkFloatToScalar(quadratic[2].x), SkFloatToScalar(quadratic[2].y));
+            fPath->quadTo(quadratic[1].x, quadratic[1].y,
+                          quadratic[2].x, quadratic[2].y);
         } else {
-            fPath->cubicTo(SkFloatToScalar(beziers->point1.x), SkFloatToScalar(beziers->point1.y),
-                           SkFloatToScalar(beziers->point2.x), SkFloatToScalar(beziers->point2.y),
-                           SkFloatToScalar(beziers->point3.x), SkFloatToScalar(beziers->point3.y));
+            fPath->cubicTo(beziers->point1.x, beziers->point1.y,
+                           beziers->point2.x, beziers->point2.y,
+                           beziers->point3.x, beziers->point3.y);
         }
         prevPt = beziers->point3;
     }
diff --git a/views/SkTouchGesture.cpp b/views/SkTouchGesture.cpp
index 3becccd..9b02417 100644
--- a/views/SkTouchGesture.cpp
+++ b/views/SkTouchGesture.cpp
@@ -50,7 +50,7 @@
 
 void SkFlingState::reset(float sx, float sy) {
     fActive = true;
-    fDirection.set(SkFloatToScalar(sx), SkFloatToScalar(sy));
+    fDirection.set(sx, sy);
     fSpeed0 = SkPoint::Normalize(&fDirection);
     fSpeed0 = pin_max_fling(fSpeed0);
     fTime0 = getseconds();
@@ -82,7 +82,7 @@
         tx = (float)sk_float_round2int(tx);
         ty = (float)sk_float_round2int(ty);
     }
-    matrix->setTranslate(SkFloatToScalar(tx), SkFloatToScalar(ty));
+    matrix->setTranslate(tx, ty);
 //    printf("---- evaluate (%g %g)\n", tx, ty);
 
     return true;
@@ -182,7 +182,7 @@
 }
 
 static SkScalar center(float pos0, float pos1) {
-    return SkFloatToScalar((pos0 + pos1) * 0.5f);
+    return (pos0 + pos1) * 0.5f;
 }
 
 static const float MAX_ZOOM_SCALE = 4;