Inline computeHinting

Change-Id: Icc191e788ba8d3ddee0234125807f3d03c08548a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/208043
Auto-Submit: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index 4ea2216..519744d 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -918,16 +918,6 @@
     }
 }
 
-// if linear-text is on, then we force hinting to be off (since that's sort of
-// the point of linear-text.
-static SkFontHinting computeHinting(const SkFont& font) {
-    SkFontHinting h = (SkFontHinting)font.getHinting();
-    if (font.isLinearMetrics()) {
-        h = kNo_SkFontHinting;
-    }
-    return h;
-}
-
 // The only reason this is not file static is because it needs the context of SkScalerContext to
 // access SkPaint::computeLuminanceColor.
 void SkScalerContext::MakeRecAndEffects(const SkFont& font, const SkPaint& paint,
@@ -1048,8 +1038,15 @@
     }
     rec->fFlags = SkToU16(flags);
 
+    // if linear-text is on, then we force hinting to be off (since that's sort of
+    // the point of linear-text.
+    SkFontHinting hinting = (SkFontHinting)font.getHinting();
+    if (font.isLinearMetrics()) {
+        hinting = kNo_SkFontHinting;
+    }
+
     // these modify fFlags, so do them after assigning fFlags
-    rec->setHinting(computeHinting(font));
+    rec->setHinting(hinting);
 
     rec->setLuminanceColor(SkPaintPriv::ComputeLuminanceColor(paint));