Remove system call in DW for default font.

The last user of the GDI default font in DW is
onMatchFamilyStyleCharacter and it doesn't appear to actually need
to use it. This change removes a system call, making things a bit
faster, as well as eliminating a call blocked in the sandbox.

BUG=chromium:459056

Review URL: https://codereview.chromium.org/1107283003
diff --git a/gm/fontmgr.cpp b/gm/fontmgr.cpp
index 5ef5c6d..14ea7ea 100644
--- a/gm/fontmgr.cpp
+++ b/gm/fontmgr.cpp
@@ -88,10 +88,10 @@
         int count = SkMin32(fm->countFamilies(), MAX_FAMILIES);
 
         for (int i = 0; i < count; ++i) {
-            SkString fname;
-            fm->getFamilyName(i, &fname);
+            SkString familyName;
+            fm->getFamilyName(i, &familyName);
             paint.setTypeface(NULL);
-            (void)drawString(canvas, fname, 20, y, paint);
+            (void)drawString(canvas, familyName, 20, y, paint);
 
             SkScalar x = 220;
 
@@ -106,10 +106,10 @@
                 x = drawString(canvas, sname, x, y, paint) + 20;
 
                 // check to see that we get different glyphs in japanese and chinese
-                x = drawCharacter(canvas, 0x5203, x, y, paint, fm, fName.c_str(), &zh, 1, fs);
-                x = drawCharacter(canvas, 0x5203, x, y, paint, fm, fName.c_str(), &ja, 1, fs);
+                x = drawCharacter(canvas, 0x5203, x, y, paint, fm, familyName.c_str(), &zh, 1, fs);
+                x = drawCharacter(canvas, 0x5203, x, y, paint, fm, familyName.c_str(), &ja, 1, fs);
                 // check that emoji characters are found
-                x = drawCharacter(canvas, 0x1f601, x, y, paint, fm, fName.c_str(), NULL, 0, fs);
+                x = drawCharacter(canvas, 0x1f601, x, y, paint, fm, familyName.c_str(), NULL,0, fs);
             }
             y += 24;
         }
diff --git a/src/ports/SkFontMgr_win_dw.cpp b/src/ports/SkFontMgr_win_dw.cpp
index b07a050..7245f52 100644
--- a/src/ports/SkFontMgr_win_dw.cpp
+++ b/src/ports/SkFontMgr_win_dw.cpp
@@ -629,21 +629,6 @@
     SkTypeface* fResolvedTypeface;
 };
 
-static HRESULT getDefaultFontFamilyName(SkSMallocWCHAR* name) {
-    NONCLIENTMETRICSW metrics;
-    metrics.cbSize = sizeof(metrics);
-    if (0 == SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(metrics), &metrics, 0)) {
-        return E_UNEXPECTED;
-    }
-
-    size_t len = wcsnlen_s(metrics.lfMessageFont.lfFaceName, LF_FACESIZE) + 1;
-    if (0 != wcsncpy_s(name->reset(len), len, metrics.lfMessageFont.lfFaceName, _TRUNCATE)) {
-        return E_UNEXPECTED;
-    }
-
-    return S_OK;
-}
-
 class FontFallbackSource : public IDWriteTextAnalysisSource {
 public:
     FontFallbackSource(const WCHAR* string, UINT32 length, const WCHAR* locale,
@@ -750,11 +735,11 @@
 {
     const DWriteStyle dwStyle(style);
 
-    SkSMallocWCHAR dwFamilyName;
-    if (NULL == familyName) {
-        HRN(getDefaultFontFamilyName(&dwFamilyName));
-    } else {
-        HRN(sk_cstring_to_wchar(familyName, &dwFamilyName));
+    const WCHAR* dwFamilyName = NULL;
+    SkSMallocWCHAR dwFamilyNameLocal;
+    if (familyName) {
+        HRN(sk_cstring_to_wchar(familyName, &dwFamilyNameLocal));
+        dwFamilyName = dwFamilyNameLocal;
     }
 
     WCHAR str[16];
@@ -816,7 +801,7 @@
 #endif
 
     SkTScopedComPtr<IDWriteTextFormat> fallbackFormat;
-    HRNM(fFactory->CreateTextFormat(dwFamilyName,
+    HRNM(fFactory->CreateTextFormat(dwFamilyName ? dwFamilyName : L"",
                                     fFontCollection.get(),
                                     dwStyle.fWeight,
                                     dwStyle.fSlant,