Nobody defines SK_SUPPORT_HINTING_SCALE_FACTOR any more, so remove it.

I left the dummy value in the flattened paint.  I'm hoping to do an overhaul of
the paint serialization format which will need a picture version bump anyway,
so it can all go together.  If that doesn't pan out we can remove this on its
own later.

BUG=
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/src@10757 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/core/SkPaint.cpp b/core/SkPaint.cpp
index 372e680..df8b292 100644
--- a/core/SkPaint.cpp
+++ b/core/SkPaint.cpp
@@ -70,9 +70,6 @@
 
     fTextSize   = SkPaintDefaults_TextSize;
     fTextScaleX = SK_Scalar1;
-#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
-    fHintingScaleFactor = SK_Scalar1;
-#endif
     fColor      = SK_ColorBLACK;
     fMiterLimit = SkPaintDefaults_MiterLimit;
     fFlags      = SkPaintDefaults_Flags;
@@ -389,13 +386,6 @@
     fTextSkewX = skewX;
 }
 
-#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
-void SkPaint::setHintingScaleFactor(SkScalar hintingScaleFactor) {
-    GEN_ID_INC_EVAL(hintingScaleFactor != fHintingScaleFactor);
-    fHintingScaleFactor = hintingScaleFactor;
-}
-#endif
-
 void SkPaint::setTextEncoding(TextEncoding encoding) {
     if ((unsigned)encoding <= kGlyphID_TextEncoding) {
         GEN_ID_INC_EVAL((unsigned)encoding != fTextEncoding);
@@ -1594,9 +1584,6 @@
     rec->fTextSize = paint.getTextSize();
     rec->fPreScaleX = paint.getTextScaleX();
     rec->fPreSkewX  = paint.getTextSkewX();
-#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
-    rec->fHintingScaleFactor = paint.getHintingScaleFactor();
-#endif
 
     if (deviceMatrix) {
         rec->fPost2x2[0][0] = sk_relax(deviceMatrix->getScaleX());
@@ -2058,12 +2045,8 @@
         ptr = write_scalar(ptr, this->getTextSize());
         ptr = write_scalar(ptr, this->getTextScaleX());
         ptr = write_scalar(ptr, this->getTextSkewX());
-#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
-        ptr = write_scalar(ptr, this->getHintingScaleFactor());
-#else
-        // Dummy value.
+        // Dummy value for obsolete hinting scale factor.  TODO: remove with next picture version
         ptr = write_scalar(ptr, SK_Scalar1);
-#endif
         ptr = write_scalar(ptr, this->getStrokeWidth());
         ptr = write_scalar(ptr, this->getStrokeMiter());
         *ptr++ = this->getColor();
@@ -2080,12 +2063,8 @@
         buffer.writeScalar(fTextSize);
         buffer.writeScalar(fTextScaleX);
         buffer.writeScalar(fTextSkewX);
-#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
-        buffer.writeScalar(fHintingScaleFactor);
-#else
-        // Dummy value.
+        // Dummy value for obsolete hinting scale factor.  TODO: remove with next picture version
         buffer.writeScalar(SK_Scalar1);
-#endif
         buffer.writeScalar(fWidth);
         buffer.writeScalar(fMiterLimit);
         buffer.writeColor(fColor);
@@ -2131,12 +2110,8 @@
         this->setTextSize(read_scalar(pod));
         this->setTextScaleX(read_scalar(pod));
         this->setTextSkewX(read_scalar(pod));
-#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
-        this->setHintingScaleFactor(read_scalar(pod));
-#else
         // Skip the hinting scalar factor, which is not supported.
         read_scalar(pod);
-#endif
         this->setStrokeWidth(read_scalar(pod));
         this->setStrokeMiter(read_scalar(pod));
         this->setColor(*pod++);
@@ -2163,12 +2138,8 @@
         this->setTextSize(buffer.readScalar());
         this->setTextScaleX(buffer.readScalar());
         this->setTextSkewX(buffer.readScalar());
-#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
-        this->setHintingScaleFactor(buffer.readScalar());
-#else
         // Skip the hinting scalar factor, which is not supported.
         buffer.readScalar();
-#endif
         this->setStrokeWidth(buffer.readScalar());
         this->setStrokeMiter(buffer.readScalar());
         this->setColor(buffer.readColor());
diff --git a/core/SkScalerContext.h b/core/SkScalerContext.h
index 52707a3..2820b5a 100644
--- a/core/SkScalerContext.h
+++ b/core/SkScalerContext.h
@@ -34,9 +34,6 @@
     SkScalar    fTextSize, fPreScaleX, fPreSkewX;
     SkScalar    fPost2x2[2][2];
     SkScalar    fFrameWidth, fMiterLimit;
-#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
-    SkScalar    fHintingScaleFactor;
-#endif
 
     //These describe the parameters to create (uniquely identify) the pre-blend.
     uint32_t    fLumBits;
diff --git a/ports/SkFontHost_FreeType.cpp b/ports/SkFontHost_FreeType.cpp
index 3a8a1ae..8d6c4d0 100644
--- a/ports/SkFontHost_FreeType.cpp
+++ b/ports/SkFontHost_FreeType.cpp
@@ -794,34 +794,9 @@
         fMatrix22.xx = fMatrix22.yy = SK_Fixed1;
         fMatrix22.xy = fMatrix22.yx = 0;
     }
-
-#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
-    if (fRec.getHinting() == SkPaint::kNo_Hinting) {
-        fScale.set(sx, sy);
-        fScaleX = SkScalarToFixed(sx);
-        fScaleY = SkScalarToFixed(sy);
-    } else {
-        SkScalar hintingScaleFactor = fRec.fHintingScaleFactor;
-
-        fScale.set(sx / hintingScaleFactor, sy / hintingScaleFactor);
-        fScaleX = SkScalarToFixed(fScale.fX);
-        fScaleY = SkScalarToFixed(fScale.fY);
-
-        fMatrix22.xx *= hintingScaleFactor;
-        fMatrix22.xy *= hintingScaleFactor;
-        fMatrix22.yx *= hintingScaleFactor;
-        fMatrix22.yy *= hintingScaleFactor;
-
-        fMatrix22Scalar.setScaleX(fMatrix22Scalar.getScaleX() * hintingScaleFactor);
-        fMatrix22Scalar.setSkewX(fMatrix22Scalar..getSkewX() * hintingScaleFactor);
-        fMatrix22Scalar.setSkewY(fMatrix22Scalar..getSkewY() * hintingScaleFactor);
-        fMatrix22Scalar.setScaleY(fMatrix22Scalar..getScaleY() * hintingScaleFactor);
-    }
-#else
     fScale.set(sx, sy);
     fScaleX = SkScalarToFixed(sx);
     fScaleY = SkScalarToFixed(sy);
-#endif
 
     fLCDIsVert = SkToBool(fRec.fFlags & SkScalerContext::kLCD_Vertical_Flag);