Reland "SkDEBUGF: use __VA_ARGS__"

This is a reland of 2267a092356d17f6444502dc92491485ccf24341

Original change's description:
> SkDEBUGF: use __VA_ARGS__
> 
> Change-Id: I42a47e821ff7a7f6cec65b38a8216cabbf0acfce
> Reviewed-on: https://skia-review.googlesource.com/139860
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

Change-Id: Ia06567e441a414f4dcdbe5663160082f889f9fef
Reviewed-on: https://skia-review.googlesource.com/141762
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
diff --git a/src/core/SkRegion.cpp b/src/core/SkRegion.cpp
index 86ef4f8..9ebc045 100644
--- a/src/core/SkRegion.cpp
+++ b/src/core/SkRegion.cpp
@@ -137,7 +137,7 @@
         if (--fRunHead->fRefCnt == 0) {
             //SkASSERT(gRgnAllocCounter > 0);
             //SkDEBUGCODE(sk_atomic_dec(&gRgnAllocCounter));
-            //SkDEBUGF(("************** gRgnAllocCounter::free %d\n", gRgnAllocCounter));
+            //SkDEBUGF("************** gRgnAllocCounter::free %d\n", gRgnAllocCounter);
             sk_free(fRunHead);
         }
     }
@@ -278,7 +278,7 @@
     SkASSERT(count > 0);
 
     if (isRunCountEmpty(count)) {
-    //  SkDEBUGF(("setRuns: empty\n"));
+    //  SkDEBUGF("setRuns: empty\n");
         assert_sentinel(runs[count-1], true);
         return this->setEmpty();
     }
diff --git a/src/core/SkRegionPriv.h b/src/core/SkRegionPriv.h
index e0e46b2..a820193 100644
--- a/src/core/SkRegionPriv.h
+++ b/src/core/SkRegionPriv.h
@@ -66,7 +66,7 @@
 
     static RunHead* Alloc(int count) {
         //SkDEBUGCODE(sk_atomic_inc(&gRgnAllocCounter);)
-        //SkDEBUGF(("************** gRgnAllocCounter::alloc %d\n", gRgnAllocCounter));
+        //SkDEBUGF("************** gRgnAllocCounter::alloc %d\n", gRgnAllocCounter);
 
         if (count < SkRegion::kRectRegionRuns) {
             return nullptr;
diff --git a/src/effects/Sk1DPathEffect.cpp b/src/effects/Sk1DPathEffect.cpp
index bad6ced..9195933 100644
--- a/src/effects/Sk1DPathEffect.cpp
+++ b/src/effects/Sk1DPathEffect.cpp
@@ -64,7 +64,7 @@
     fInitialOffset = phase;
 
     if ((unsigned)style > kMorph_Style) {
-        SkDEBUGF(("SkPath1DPathEffect style enum out of range %d\n", style));
+        SkDEBUGF("SkPath1DPathEffect style enum out of range %d\n", style);
     }
     fStyle = style;
 }
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index 03f499f..09b9c4e 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -327,15 +327,15 @@
     SkDEBUGCODE(
         FT_MM_Var* variations = nullptr;
         if (FT_Get_MM_Var(rec->fFace.get(), &variations)) {
-            SkDEBUGF(("INFO: font %s claims variations, but none found.\n",
-                      rec->fFace->family_name));
+            SkDEBUGF("INFO: font %s claims variations, but none found.\n",
+                     rec->fFace->family_name);
             return;
         }
         SkAutoFree autoFreeVariations(variations);
 
         if (static_cast<FT_UInt>(data.getAxisCount()) != variations->num_axis) {
-            SkDEBUGF(("INFO: font %s has %d variations, but %d were specified.\n",
-                      rec->fFace->family_name, variations->num_axis, data.getAxisCount()));
+            SkDEBUGF("INFO: font %s has %d variations, but %d were specified.\n",
+                     rec->fFace->family_name, variations->num_axis, data.getAxisCount());
             return;
         }
     )
@@ -345,8 +345,8 @@
         coords[i] = data.getAxis()[i];
     }
     if (FT_Set_Var_Design_Coordinates(rec->fFace.get(), data.getAxisCount(), coords.get())) {
-        SkDEBUGF(("INFO: font %s has variations, but specified variations could not be set.\n",
-                  rec->fFace->family_name));
+        SkDEBUGF("INFO: font %s has variations, but specified variations could not be set.\n",
+                 rec->fFace->family_name);
         return;
     }
 
@@ -764,7 +764,7 @@
 /** Returns the bitmap strike equal to or just larger than the requested size. */
 static FT_Int chooseBitmapStrike(FT_Face face, FT_F26Dot6 scaleY) {
     if (face == nullptr) {
-        SkDEBUGF(("chooseBitmapStrike aborted due to nullptr face.\n"));
+        SkDEBUGF("chooseBitmapStrike aborted due to nullptr face.\n");
         return -1;
     }
 
@@ -808,7 +808,7 @@
 
     // load the font file
     if (nullptr == fFaceRec) {
-        SkDEBUGF(("Could not create FT_Face.\n"));
+        SkDEBUGF("Could not create FT_Face.\n");
         return;
     }
 
@@ -892,7 +892,7 @@
         return size;
     }());
     if (nullptr == ftSize) {
-        SkDEBUGF(("Could not create FT_Size.\n"));
+        SkDEBUGF("Could not create FT_Size.\n");
         return;
     }
 
@@ -930,8 +930,8 @@
     } else if (FT_HAS_FIXED_SIZES(fFaceRec->fFace)) {
         fStrikeIndex = chooseBitmapStrike(fFaceRec->fFace.get(), scaleY);
         if (fStrikeIndex == -1) {
-            SkDEBUGF(("No glyphs for font \"%s\" size %f.\n",
-                      fFaceRec->fFace->family_name, fScale.fY));
+            SkDEBUGF("No glyphs for font \"%s\" size %f.\n",
+                     fFaceRec->fFace->family_name, fScale.fY);
             return;
         }
 
@@ -959,7 +959,7 @@
         // Force this flag off for bitmap only fonts.
         fLoadGlyphFlags &= ~FT_LOAD_NO_BITMAP;
     } else {
-        SkDEBUGF(("Unknown kind of font \"%s\" size %f.\n", fFaceRec->fFace->family_name, fScale.fY));
+        SkDEBUGF("Unknown kind of font \"%s\" size %f.\n", fFaceRec->fFace->family_name, fScale.fY);
         return;
     }
 
@@ -1231,7 +1231,7 @@
     }
 
 #ifdef ENABLE_GLYPH_SPEW
-    SkDEBUGF(("Metrics(glyph:%d flags:0x%x) w:%d\n", glyph->getGlyphID(), fLoadGlyphFlags, glyph->fWidth));
+    SkDEBUGF("Metrics(glyph:%d flags:0x%x) w:%d\n", glyph->getGlyphID(), fLoadGlyphFlags, glyph->fWidth);
 #endif
 }
 
@@ -1847,7 +1847,7 @@
         if (index >= 0) {
             weight = commonWeights[index].weight;
         } else {
-            SkDEBUGF(("Do not know weight for: %s (%s) \n", face->family_name, psFontInfo.weight));
+            SkDEBUGF("Do not know weight for: %s (%s) \n", face->family_name, psFontInfo.weight);
         }
     }
 
@@ -1871,8 +1871,8 @@
         FT_MM_Var* variations = nullptr;
         FT_Error err = FT_Get_MM_Var(face, &variations);
         if (err) {
-            SkDEBUGF(("INFO: font %s claims to have variations, but none found.\n",
-                      face->family_name));
+            SkDEBUGF("INFO: font %s claims to have variations, but none found.\n",
+                     face->family_name);
             return false;
         }
         SkAutoFree autoFreeVariations(variations);
@@ -1907,15 +1907,15 @@
             if (axisDefinition.fTag == coordinate.axis) {
                 const SkScalar axisValue = SkTPin(coordinate.value, axisMin, axisMax);
                 if (coordinate.value != axisValue) {
-                    SkDEBUGF(("Requested font axis value out of range: "
-                              "%s '%c%c%c%c' %f; pinned to %f.\n",
-                              name.c_str(),
-                              (axisDefinition.fTag >> 24) & 0xFF,
-                              (axisDefinition.fTag >> 16) & 0xFF,
-                              (axisDefinition.fTag >>  8) & 0xFF,
-                              (axisDefinition.fTag      ) & 0xFF,
-                              SkScalarToDouble(coordinate.value),
-                              SkScalarToDouble(axisValue)));
+                    SkDEBUGF("Requested font axis value out of range: "
+                             "%s '%c%c%c%c' %f; pinned to %f.\n",
+                             name.c_str(),
+                             (axisDefinition.fTag >> 24) & 0xFF,
+                             (axisDefinition.fTag >> 16) & 0xFF,
+                             (axisDefinition.fTag >>  8) & 0xFF,
+                             (axisDefinition.fTag      ) & 0xFF,
+                             SkScalarToDouble(coordinate.value),
+                             SkScalarToDouble(axisValue));
                 }
                 axisValues[i] = SkScalarToFixed(axisValue);
                 break;
@@ -1936,12 +1936,12 @@
                 }
             }
             if (!found) {
-                SkDEBUGF(("Requested font axis not found: %s '%c%c%c%c'\n",
-                          name.c_str(),
-                          (skTag >> 24) & 0xFF,
-                          (skTag >> 16) & 0xFF,
-                          (skTag >>  8) & 0xFF,
-                          (skTag)       & 0xFF));
+                SkDEBUGF("Requested font axis not found: %s '%c%c%c%c'\n",
+                         name.c_str(),
+                         (skTag >> 24) & 0xFF,
+                         (skTag >> 16) & 0xFF,
+                         (skTag >>  8) & 0xFF,
+                         (skTag)       & 0xFF);
             }
         }
     )
diff --git a/src/ports/SkFontHost_FreeType_common.cpp b/src/ports/SkFontHost_FreeType_common.cpp
index bd15834..af2e442 100644
--- a/src/ports/SkFontHost_FreeType_common.cpp
+++ b/src/ports/SkFontHost_FreeType_common.cpp
@@ -176,7 +176,7 @@
             }
             break;
         default:
-            SkDEBUGF(("FT_Pixel_Mode %d", bitmap.pixel_mode));
+            SkDEBUGF("FT_Pixel_Mode %d", bitmap.pixel_mode);
             SkDEBUGFAIL("unsupported FT_Pixel_Mode for LCD16");
             break;
     }
@@ -276,7 +276,7 @@
             dst += dstRowBytes;
         }
     } else {
-        SkDEBUGF(("FT_Pixel_Mode %d, SkMask::Format %d\n", srcFormat, dstFormat));
+        SkDEBUGF("FT_Pixel_Mode %d, SkMask::Format %d\n", srcFormat, dstFormat);
         SkDEBUGFAIL("unsupported combination of FT_Pixel_Mode and SkMask::Format");
     }
 }
diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp
index a7cbd97..feb22c8 100644
--- a/src/ports/SkFontMgr_android.cpp
+++ b/src/ports/SkFontMgr_android.cpp
@@ -187,8 +187,8 @@
 
             std::unique_ptr<SkStreamAsset> stream = SkStream::MakeFromFile(pathName.c_str());
             if (!stream) {
-                SkDEBUGF(("Requested font file %s does not exist or cannot be opened.\n",
-                          pathName.c_str()));
+                SkDEBUGF("Requested font file %s does not exist or cannot be opened.\n",
+                         pathName.c_str());
                 continue;
             }
 
@@ -200,8 +200,8 @@
             if (!scanner.scanFont(stream.get(), ttcIndex,
                                   &familyName, &style, &isFixedWidth, &axisDefinitions))
             {
-                SkDEBUGF(("Requested font file %s exists, but is not a valid font.\n",
-                          pathName.c_str()));
+                SkDEBUGF("Requested font file %s exists, but is not a valid font.\n",
+                         pathName.c_str());
                 continue;
             }
 
@@ -577,11 +577,11 @@
     if (custom) {
         SkASSERT(0 <= custom->fSystemFontUse);
         SkASSERT(custom->fSystemFontUse < SK_ARRAY_COUNT(gSystemFontUseStrings));
-        SkDEBUGF(("SystemFontUse: %s BasePath: %s Fonts: %s FallbackFonts: %s\n",
-                  gSystemFontUseStrings[custom->fSystemFontUse],
-                  custom->fBasePath,
-                  custom->fFontsXml,
-                  custom->fFallbackFontsXml));
+        SkDEBUGF("SystemFontUse: %s BasePath: %s Fonts: %s FallbackFonts: %s\n",
+                 gSystemFontUseStrings[custom->fSystemFontUse],
+                 custom->fBasePath,
+                 custom->fFontsXml,
+                 custom->fFallbackFontsXml);
     }
     return sk_make_sp<SkFontMgr_Android>(custom);
 }
diff --git a/src/ports/SkOSFile_stdio.cpp b/src/ports/SkOSFile_stdio.cpp
index d8541c2..10ba7c8 100644
--- a/src/ports/SkOSFile_stdio.cpp
+++ b/src/ports/SkOSFile_stdio.cpp
@@ -93,8 +93,8 @@
 #endif
 
     if (nullptr == file && (flags & kWrite_SkFILE_Flag)) {
-        SkDEBUGF(("sk_fopen: fopen(\"%s\", \"%s\") returned nullptr (errno:%d): %s\n",
-                  path, perm, errno, strerror(errno)));
+        SkDEBUGF("sk_fopen: fopen(\"%s\", \"%s\") returned nullptr (errno:%d): %s\n",
+                 path, perm, errno, strerror(errno));
     }
     return file;
 }
diff --git a/src/ports/SkTypeface_win_dw.cpp b/src/ports/SkTypeface_win_dw.cpp
index 3bf6134..b419ae9 100644
--- a/src/ports/SkTypeface_win_dw.cpp
+++ b/src/ports/SkTypeface_win_dw.cpp
@@ -484,7 +484,7 @@
             !exists ||
             FAILED(sk_get_locale_string(postScriptNames.get(), nullptr, &info->fPostScriptName)))
         {
-            SkDEBUGF(("Unable to get postscript name for typeface %p\n", this));
+            SkDEBUGF("Unable to get postscript name for typeface %p\n", this);
         }
     }
 
@@ -493,7 +493,7 @@
     if (FAILED(fDWriteFontFamily->GetFamilyNames(&familyNames)) ||
         FAILED(sk_get_locale_string(familyNames.get(), nullptr, &info->fFontName)))
     {
-        SkDEBUGF(("Unable to get family name for typeface 0x%p\n", this));
+        SkDEBUGF("Unable to get family name for typeface 0x%p\n", this);
     }
     if (info->fPostScriptName.isEmpty()) {
         info->fPostScriptName = info->fFontName;
diff --git a/src/utils/SkFloatUtils.h b/src/utils/SkFloatUtils.h
index 101aac7..b89f5c4 100644
--- a/src/utils/SkFloatUtils.h
+++ b/src/utils/SkFloatUtils.h
@@ -116,7 +116,7 @@
 
         const Bits dist = DistanceBetweenSignAndMagnitudeNumbers(fU.bits,
                                                                  rhs.fU.bits);
-        //SkDEBUGF(("(%f, %f, %d) ", u_.value_, rhs.u_.value_, dist));
+        //SkDEBUGF("(%f, %f, %d) ", u_.value_, rhs.u_.value_, dist);
         return dist <= kMaxUlps;
     }
 
diff --git a/src/utils/SkMultiPictureDocument.cpp b/src/utils/SkMultiPictureDocument.cpp
index f7081e6..f8eaaf8 100644
--- a/src/utils/SkMultiPictureDocument.cpp
+++ b/src/utils/SkMultiPictureDocument.cpp
@@ -195,7 +195,7 @@
     // PagerCanvas::onDrawAnnotation().
     picture->playback(&canvas);
     if (canvas.fIndex != dstArrayCount) {
-        SkDEBUGF(("Malformed SkMultiPictureDocument\n"));
+        SkDEBUGF("Malformed SkMultiPictureDocument\n");
     }
     return true;
 }
diff --git a/src/xps/SkXPSDevice.cpp b/src/xps/SkXPSDevice.cpp
index 797ff38..b984ef3 100644
--- a/src/xps/SkXPSDevice.cpp
+++ b/src/xps/SkXPSDevice.cpp
@@ -361,7 +361,7 @@
         nullptr);
     SkAutoTMalloc<unsigned char> fontPackageBuffer(fontPackageBufferRaw);
     if (result != NO_ERROR) {
-        SkDEBUGF(("CreateFontPackage Error %lu", result));
+        SkDEBUGF("CreateFontPackage Error %lu", result);
         return E_UNEXPECTED;
     }
 
@@ -1654,7 +1654,7 @@
                 pathIsMutable = true;
             }
             if (!Simplify(*fillablePath, xpsCompatiblePath)) {
-                SkDEBUGF(("Could not simplify inverse winding path."));
+                SkDEBUGF("Could not simplify inverse winding path.");
                 return;
             }
         }
@@ -1818,7 +1818,7 @@
 
 void SkXPSDevice::drawSprite(const SkBitmap& bitmap, int x, int y, const SkPaint& paint) {
     //TODO: override this for XPS
-    SkDEBUGF(("XPS drawSprite not yet implemented."));
+    SkDEBUGF("XPS drawSprite not yet implemented.");
 }
 
 HRESULT SkXPSDevice::CreateTypefaceUse(const SkPaint& paint,