sk_tool_utils -> ToolUtils, and git clang-format

sk_tool_utils doesn't really fit the naming convention
the rest of code under tools/ tends to use.

Change-Id: I45326a174101c6eb4b6149e9c742f658f2fd23b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202313
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/tests/AnimatedImageTest.cpp b/tests/AnimatedImageTest.cpp
index cb4e670..93292d1 100644
--- a/tests/AnimatedImageTest.cpp
+++ b/tests/AnimatedImageTest.cpp
@@ -22,7 +22,7 @@
 #include "SkTypes.h"
 #include "SkUnPreMultiply.h"
 #include "Test.h"
-#include "sk_tool_utils.h"
+#include "ToolUtils.h"
 
 #include <algorithm>
 #include <memory>
@@ -207,7 +207,7 @@
                 bm.eraseColor(0);
             } else {
                 const SkBitmap& priorFrame = frames[options.fPriorFrame];
-                if (!sk_tool_utils::copy_to(&bm, priorFrame.colorType(), priorFrame)) {
+                if (!ToolUtils::copy_to(&bm, priorFrame.colorType(), priorFrame)) {
                     ERRORF(r, "Failed to copy %s frame %i", file, options.fPriorFrame);
                     options.fPriorFrame = SkCodec::kNoFrame;
                 }
diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp
index c2a8f25..5b02491 100644
--- a/tests/BitmapCopyTest.cpp
+++ b/tests/BitmapCopyTest.cpp
@@ -15,7 +15,7 @@
 #include "SkSize.h"
 #include "SkTypes.h"
 #include "Test.h"
-#include "sk_tool_utils.h"
+#include "ToolUtils.h"
 
 static void init_src(const SkBitmap& bitmap) {
     if (bitmap.getPixels()) {
@@ -102,7 +102,7 @@
             // Test copying an extracted subset.
             for (size_t j = 0; j < SK_ARRAY_COUNT(gPairs); j++) {
                 SkBitmap copy;
-                bool success = sk_tool_utils::copy_to(&copy, gPairs[j].fColorType, subset);
+                bool     success = ToolUtils::copy_to(&copy, gPairs[j].fColorType, subset);
                 if (!success) {
                     // Skip checking that success matches fValid, which is redundant
                     // with the code below.
diff --git a/tests/BitmapTest.cpp b/tests/BitmapTest.cpp
index d1462f8..be5b972 100644
--- a/tests/BitmapTest.cpp
+++ b/tests/BitmapTest.cpp
@@ -15,7 +15,7 @@
 #include "SkRefCnt.h"
 #include "SkTypes.h"
 #include "Test.h"
-#include "sk_tool_utils.h"
+#include "ToolUtils.h"
 
 static void test_peekpixels(skiatest::Reporter* reporter) {
     const SkImageInfo info = SkImageInfo::MakeN32Premul(10, 10);
@@ -143,7 +143,7 @@
     };
     for (SkColorType ct : colorTypes) {
         SkBitmap copy;
-        if (!sk_tool_utils::copy_to(&copy, ct, source)) {
+        if (!ToolUtils::copy_to(&copy, ct, source)) {
             ERRORF(r, "SkBitmap::copy failed %d", (int)ct);
             continue;
         }
diff --git a/tests/BlurTest.cpp b/tests/BlurTest.cpp
index 36723f6..963f236 100644
--- a/tests/BlurTest.cpp
+++ b/tests/BlurTest.cpp
@@ -686,7 +686,7 @@
         paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, sigma));
         surf->getCanvas()->drawRect(r, paint);
 
-        sk_tool_utils::PixelIter iter(surf.get());
+        ToolUtils::PixelIter iter(surf.get());
         SkIPoint  loc;
         while (const SkPMColor* p = (const SkPMColor*)iter.next(&loc)) {
             if (ir.contains(loc.fX, loc.fY)) {
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp
index 95f9d8d..a09fe62 100644
--- a/tests/CachedDecodingPixelRefTest.cpp
+++ b/tests/CachedDecodingPixelRefTest.cpp
@@ -17,7 +17,7 @@
 #include "SkTypes.h"
 #include "SkUtils.h"
 #include "Test.h"
-#include "sk_tool_utils.h"
+#include "ToolUtils.h"
 
 #include <utility>
 
@@ -31,7 +31,7 @@
     static int Width() { return 10; }
     static int Height() { return 10; }
     // value choosen so that there is no loss when converting to to RGB565 and back
-    static SkColor Color() { return sk_tool_utils::color_to_565(0xffaabbcc); }
+    static SkColor   Color() { return ToolUtils::color_to_565(0xffaabbcc); }
     static SkPMColor PMColor() { return SkPreMultiplyColor(Color()); }
 
     TestImageGenerator(TestType type, skiatest::Reporter* reporter,
diff --git a/tests/CodecAnimTest.cpp b/tests/CodecAnimTest.cpp
index d3f385e..ec4ca18 100644
--- a/tests/CodecAnimTest.cpp
+++ b/tests/CodecAnimTest.cpp
@@ -20,7 +20,7 @@
 #include "SkString.h"
 #include "SkTypes.h"
 #include "Test.h"
-#include "sk_tool_utils.h"
+#include "ToolUtils.h"
 
 #include <cstring>
 #include <memory>
@@ -317,8 +317,8 @@
                 bm->allocPixels(decodeInfo);
                 if (cachedIndex != SkCodec::kNoFrame) {
                     // First copy the pixels from the cached frame
-                    const bool success = sk_tool_utils::copy_to(bm, kN32_SkColorType,
-                            cachedFrames[cachedIndex]);
+                    const bool success =
+                            ToolUtils::copy_to(bm, kN32_SkColorType, cachedFrames[cachedIndex]);
                     REPORTER_ASSERT(r, success);
                 }
                 SkCodec::Options opts;
diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp
index 8c918a8..fbbeb4a 100644
--- a/tests/CodecTest.cpp
+++ b/tests/CodecTest.cpp
@@ -41,8 +41,8 @@
 #include "SkUnPreMultiply.h"
 #include "SkWebpEncoder.h"
 #include "Test.h"
+#include "ToolUtils.h"
 #include "png.h"
-#include "sk_tool_utils.h"
 
 #include <setjmp.h>
 #include <cstring>
@@ -818,7 +818,7 @@
 
     if (decodedBm.colorType() != bm.colorType()) {
         SkBitmap tmp;
-        bool success = sk_tool_utils::copy_to(&tmp, bm.colorType(), decodedBm);
+        bool     success = ToolUtils::copy_to(&tmp, bm.colorType(), decodedBm);
         REPORTER_ASSERT(r, success);
         if (!success) {
             return;
diff --git a/tests/EncodedInfoTest.cpp b/tests/EncodedInfoTest.cpp
index a8b7437..3babbd0 100644
--- a/tests/EncodedInfoTest.cpp
+++ b/tests/EncodedInfoTest.cpp
@@ -7,7 +7,7 @@
 
 #include "Resources.h"
 #include "Test.h"
-#include "sk_tool_utils.h"
+#include "ToolUtils.h"
 
 #include "SkBitmap.h"
 #include "SkCodec.h"
@@ -38,5 +38,5 @@
     result = codec->getPixels(bm2.pixmap());
     REPORTER_ASSERT(r, result == SkCodec::kSuccess);
 
-    REPORTER_ASSERT(r, sk_tool_utils::equal_pixels(bm.pixmap(), bm2.pixmap()));
+    REPORTER_ASSERT(r, ToolUtils::equal_pixels(bm.pixmap(), bm2.pixmap()));
 }
diff --git a/tests/GrCCPRTest.cpp b/tests/GrCCPRTest.cpp
index f65bab6..7cd8f10 100644
--- a/tests/GrCCPRTest.cpp
+++ b/tests/GrCCPRTest.cpp
@@ -11,8 +11,8 @@
 #include "GrClip.h"
 #include "GrContextPriv.h"
 #include "GrDrawingManager.h"
-#include "GrPathRenderer.h"
 #include "GrPaint.h"
+#include "GrPathRenderer.h"
 #include "GrRecordingContext.h"
 #include "GrRecordingContextPriv.h"
 #include "GrRenderTargetContext.h"
@@ -23,9 +23,9 @@
 #include "SkMatrix.h"
 #include "SkPathPriv.h"
 #include "SkRect.h"
-#include "sk_tool_utils.h"
-#include "ccpr/GrCoverageCountingPathRenderer.h"
+#include "ToolUtils.h"
 #include "ccpr/GrCCPathCache.h"
+#include "ccpr/GrCoverageCountingPathRenderer.h"
 #include "mock/GrMockTypes.h"
 
 #include <cmath>
@@ -355,7 +355,7 @@
             do {
                 step = primes[rand.nextU() % SK_ARRAY_COUNT(primes)];
             } while (step == numPts);
-            fPaths[i] = sk_tool_utils::make_star(SkRect::MakeLTRB(0,0,1,1), numPts, step);
+            fPaths[i] = ToolUtils::make_star(SkRect::MakeLTRB(0, 0, 1, 1), numPts, step);
         }
     }
 
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index 26be9ee..10a359d 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -5,6 +5,7 @@
  * found in the LICENSE file.
  */
 
+#include "Resources.h"
 #include "SkArithmeticImageFilter.h"
 #include "SkBitmap.h"
 #include "SkBlurImageFilter.h"
@@ -38,9 +39,8 @@
 #include "SkTableColorFilter.h"
 #include "SkTileImageFilter.h"
 #include "SkXfermodeImageFilter.h"
-#include "Resources.h"
 #include "Test.h"
-#include "sk_tool_utils.h"
+#include "ToolUtils.h"
 
 #include "GrCaps.h"
 #include "GrContext.h"
@@ -713,7 +713,7 @@
 
     SkPaint textPaint;
     textPaint.setColor(SK_ColorWHITE);
-    SkFont font(sk_tool_utils::create_portable_typeface(), height);
+    SkFont font(ToolUtils::create_portable_typeface(), height);
 
     const char* text = "ABC";
     const SkScalar yPos = SkIntToScalar(height);
@@ -751,7 +751,7 @@
                 }
             }
 
-            if (!sk_tool_utils::equal_pixels(untiledResult, tiledResult)) {
+            if (!ToolUtils::equal_pixels(untiledResult, tiledResult)) {
                 REPORTER_ASSERT(reporter, false, filters.getName(i));
                 break;
             }
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp
index 551c868..e97d36d 100644
--- a/tests/ImageTest.cpp
+++ b/tests/ImageTest.cpp
@@ -29,8 +29,8 @@
 #include "Test.h"
 
 #include "Resources.h"
+#include "ToolUtils.h"
 #include "sk_pixel_iter.h"
-#include "sk_tool_utils.h"
 
 #include "GrContextPriv.h"
 #include "GrContextThreadSafeProxy.h"
@@ -1365,7 +1365,7 @@
             surf->getCanvas()->drawImageRect(img, dst, &paint);
 
             // we should draw nothing
-            sk_tool_utils::PixelIter iter(surf.get());
+            ToolUtils::PixelIter iter(surf.get());
             while (void* addr = iter.next()) {
                 REPORTER_ASSERT(reporter, *(SkPMColor*)addr == 0);
             }
diff --git a/tests/IncrTopoSortTest.cpp b/tests/IncrTopoSortTest.cpp
index 849c20a..a950785 100644
--- a/tests/IncrTopoSortTest.cpp
+++ b/tests/IncrTopoSortTest.cpp
@@ -9,7 +9,7 @@
 #include "SkTSort.h"
 #include "Test.h"
 
-#include "sk_tool_utils.h"
+#include "ToolUtils.h"
 
 // A node in the graph. This corresponds to an opList in the MDB world.
 class Node : public SkRefCnt {
diff --git a/tests/OnFlushCallbackTest.cpp b/tests/OnFlushCallbackTest.cpp
index d20458e..4f974408 100644
--- a/tests/OnFlushCallbackTest.cpp
+++ b/tests/OnFlushCallbackTest.cpp
@@ -472,12 +472,12 @@
 // Enable this if you want to debug the final draws w/o having the atlasCallback create the
 // atlas
 #if 0
-#include "SkImageEncoder.h"
 #include "SkGrPriv.h"
-#include "sk_tool_utils.h"
+#include "SkImageEncoder.h"
+#include "ToolUtils.h"
 
 static void save_bm(const SkBitmap& bm, const char name[]) {
-    bool result = sk_tool_utils::EncodeImageToFile(name, bm, SkEncodedImageFormat::kPNG, 100);
+    bool result = ToolUtils::EncodeImageToFile(name, bm, SkEncodedImageFormat::kPNG, 100);
     SkASSERT(result);
 }
 
diff --git a/tests/PDFDocumentTest.cpp b/tests/PDFDocumentTest.cpp
index 95821e8..c3d6ed2 100644
--- a/tests/PDFDocumentTest.cpp
+++ b/tests/PDFDocumentTest.cpp
@@ -14,7 +14,7 @@
 #include "SkPDFDocument.h"
 #include "SkStream.h"
 
-#include "sk_tool_utils.h"
+#include "ToolUtils.h"
 
 static void test_empty(skiatest::Reporter* reporter) {
     SkDynamicMemoryWStream stream;
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index f7ea80a..d89cf03 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -32,7 +32,7 @@
 #include "SkStream.h"
 #include "SkTo.h"
 #include "SkTypes.h"
-#include "sk_tool_utils.h"
+#include "ToolUtils.h"
 
 #include <cstdlib>
 #include <cmath>
@@ -314,8 +314,7 @@
         REPORTER_ASSERT(reporter,
                         !SkPDFFont::CanEmbedTypeface(noEmbedTypeface.get(), &doc));
     }
-    sk_sp<SkTypeface> portableTypeface(
-            sk_tool_utils::create_portable_typeface(nullptr, SkFontStyle()));
+    sk_sp<SkTypeface> portableTypeface(ToolUtils::create_portable_typeface(nullptr, SkFontStyle()));
     REPORTER_ASSERT(reporter,
                     SkPDFFont::CanEmbedTypeface(portableTypeface.get(), &doc));
 }
diff --git a/tests/PathOpsConicIntersectionTest.cpp b/tests/PathOpsConicIntersectionTest.cpp
index 1de1583..7389556 100644
--- a/tests/PathOpsConicIntersectionTest.cpp
+++ b/tests/PathOpsConicIntersectionTest.cpp
@@ -110,8 +110,7 @@
     canvas.drawPath(path, paint);
     SkString filename("c:\\Users\\caryclark\\Documents\\");
     filename.appendf("%s.png", name);
-    sk_tool_utils::EncodeImageToFile(filename.c_str(), bitmap,
-            SkEncodedImageFormat::kPNG, 100);
+    ToolUtils::EncodeImageToFile(filename.c_str(), bitmap, SkEncodedImageFormat::kPNG, 100);
 }
 
 static void writeDPng(const SkDConic& dC, const char* name) {
@@ -152,8 +151,7 @@
     canvas.drawPath(path, paint);
     SkString filename("c:\\Users\\caryclark\\Documents\\");
     filename.appendf("%s.png", name);
-    sk_tool_utils::EncodeImageToFile(filename.c_str(), bitmap,
-            SkEncodedImageFormat::kPNG, 100);
+    ToolUtils::EncodeImageToFile(filename.c_str(), bitmap, SkEncodedImageFormat::kPNG, 100);
 }
 #endif
 
@@ -290,7 +288,7 @@
         }
         SkString filename("c:\\Users\\caryclark\\Documents\\");
         filename.appendf("f%d.png", index);
-        sk_tool_utils::EncodeImageToFile(filename.c_str(), bitmap, SkEncodedImageFormat::kPNG, 100);
+        ToolUtils::EncodeImageToFile(filename.c_str(), bitmap, SkEncodedImageFormat::kPNG, 100);
     }
 }
 #endif
diff --git a/tests/PremulAlphaRoundTripTest.cpp b/tests/PremulAlphaRoundTripTest.cpp
index bc92bd8..e56f612 100644
--- a/tests/PremulAlphaRoundTripTest.cpp
+++ b/tests/PremulAlphaRoundTripTest.cpp
@@ -8,7 +8,7 @@
 #include "SkCanvas.h"
 #include "SkSurface.h"
 #include "Test.h"
-#include "sk_tool_utils.h"
+#include "ToolUtils.h"
 
 #include "GrContext.h"
 
@@ -74,8 +74,8 @@
         readBmp2.eraseColor(0);
 
         surf->readPixels(readBmp1, 0, 0);
-        sk_tool_utils::write_pixels(surf, readBmp1, 0, 0, gUnpremul[upmaIdx].fColorType,
-                                    kUnpremul_SkAlphaType);
+        ToolUtils::write_pixels(
+                surf, readBmp1, 0, 0, gUnpremul[upmaIdx].fColorType, kUnpremul_SkAlphaType);
         surf->readPixels(readBmp2, 0, 0);
 
         bool success = true;
diff --git a/tests/SerialProcsTest.cpp b/tests/SerialProcsTest.cpp
index 6129e0a..6ed362e 100644
--- a/tests/SerialProcsTest.cpp
+++ b/tests/SerialProcsTest.cpp
@@ -5,15 +5,15 @@
  * found in the LICENSE file.
  */
 
-#include "Test.h"
 #include "Resources.h"
-#include "sk_tool_utils.h"
 #include "SkCanvas.h"
 #include "SkImageSource.h"
 #include "SkPicture.h"
 #include "SkPictureRecorder.h"
 #include "SkSerialProcs.h"
 #include "SkSurface.h"
+#include "Test.h"
+#include "ToolUtils.h"
 
 static sk_sp<SkImage> picture_to_image(sk_sp<SkPicture> pic) {
     SkIRect r = pic->cullRect().round();
@@ -77,7 +77,7 @@
         REPORTER_ASSERT(reporter, data);
 
         auto dst_img = picture_to_image(new_pic);
-        REPORTER_ASSERT(reporter, sk_tool_utils::equal_pixels(src_img.get(), dst_img.get()));
+        REPORTER_ASSERT(reporter, ToolUtils::equal_pixels(src_img.get(), dst_img.get()));
     }
 }
 
diff --git a/tests/SerializationTest.cpp b/tests/SerializationTest.cpp
index 6712575..4fee4e4 100644
--- a/tests/SerializationTest.cpp
+++ b/tests/SerializationTest.cpp
@@ -19,9 +19,9 @@
 #include "SkMatrixPriv.h"
 #include "SkNormalSource.h"
 #include "SkOSFile.h"
-#include "SkReadBuffer.h"
 #include "SkPicturePriv.h"
 #include "SkPictureRecorder.h"
+#include "SkReadBuffer.h"
 #include "SkShaderBase.h"
 #include "SkTableColorFilter.h"
 #include "SkTemplates.h"
@@ -29,8 +29,8 @@
 #include "SkTypeface.h"
 #include "SkWriteBuffer.h"
 #include "SkXfermodeImageFilter.h"
-#include "sk_tool_utils.h"
 #include "Test.h"
+#include "ToolUtils.h"
 
 static const uint32_t kArraySize = 64;
 static const int kBitmapSize = 256;
@@ -588,11 +588,8 @@
 
         sk_sp<SkLights> fLights = builder.finish();
 
-        SkBitmap diffuse = sk_tool_utils::create_checkerboard_bitmap(
-                kTexSize, kTexSize,
-                0x00000000,
-                sk_tool_utils::color_to_565(0xFF804020),
-                8);
+        SkBitmap diffuse = ToolUtils::create_checkerboard_bitmap(
+                kTexSize, kTexSize, 0x00000000, ToolUtils::color_to_565(0xFF804020), 8);
 
         SkRect bitmapBounds = SkRect::MakeIWH(diffuse.width(), diffuse.height());
 
@@ -605,7 +602,7 @@
         SkBitmap normals;
         normals.allocN32Pixels(kTexSize, kTexSize);
 
-        sk_tool_utils::create_frustum_normal_map(&normals, SkIRect::MakeWH(kTexSize, kTexSize));
+        ToolUtils::create_frustum_normal_map(&normals, SkIRect::MakeWH(kTexSize, kTexSize));
         sk_sp<SkShader> normalMap = SkShader::MakeBitmapShader(normals, SkShader::kClamp_TileMode,
                 SkShader::kClamp_TileMode, &matrix);
         sk_sp<SkNormalSource> normalSource = SkNormalSource::MakeFromNormalMap(std::move(normalMap),
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index 640b341..f2279b8 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -31,8 +31,7 @@
 #include <initializer_list>
 #include <vector>
 
-#include "sk_tool_utils.h"
-
+#include "ToolUtils.h"
 
 static void release_direct_surface_storage(void* pixels, void* context) {
     SkASSERT(pixels == context);
@@ -1019,9 +1018,10 @@
             auto img = surf->makeImageSnapshot();
             if (!img && false) {    // change to true to document the differences
                 SkDebugf("image failed: [%08X %08X] %14s %s\n",
-                         info.width(), info.height(),
-                         sk_tool_utils::colortype_name(info.colorType()),
-                         sk_tool_utils::alphatype_name(info.alphaType()));
+                         info.width(),
+                         info.height(),
+                         ToolUtils::colortype_name(info.colorType()),
+                         ToolUtils::alphatype_name(info.alphaType()));
                 return;
             }
             REPORTER_ASSERT(reporter, img != nullptr);
diff --git a/tests/TextBlobCacheTest.cpp b/tests/TextBlobCacheTest.cpp
index 3115818..a1a6e78 100644
--- a/tests/TextBlobCacheTest.cpp
+++ b/tests/TextBlobCacheTest.cpp
@@ -5,7 +5,7 @@
  * found in the LICENSE file.
  */
 
-#include "sk_tool_utils.h"
+#include "ToolUtils.h"
 
 #include "RandomScalerContext.h"
 #include "SkCanvas.h"
diff --git a/tests/TextBlobTest.cpp b/tests/TextBlobTest.cpp
index 2862208..d18d05b 100644
--- a/tests/TextBlobTest.cpp
+++ b/tests/TextBlobTest.cpp
@@ -13,7 +13,7 @@
 #include "SkTypeface.h"
 
 #include "Test.h"
-#include "sk_tool_utils.h"
+#include "ToolUtils.h"
 
 class TextBlobTester {
 public:
@@ -176,7 +176,7 @@
         // Kitchen sink font.
         font.setSize(42);
         font.setScaleX(4.2f);
-        font.setTypeface(sk_tool_utils::create_portable_typeface());
+        font.setTypeface(ToolUtils::create_portable_typeface());
         font.setSkewX(0.42f);
         font.setHinting(kFull_SkFontHinting);
         font.setEdging(SkFont::Edging::kSubpixelAntiAlias);
@@ -429,7 +429,7 @@
     sk_sp<SkImage> img0 = render(blob0.get());
     sk_sp<SkImage> img1 = render(blob1.get());
     if (img0 && img1) {
-        REPORTER_ASSERT(reporter, sk_tool_utils::equal_pixels(img0.get(), img1.get()));
+        REPORTER_ASSERT(reporter, ToolUtils::equal_pixels(img0.get(), img1.get()));
     }
 }
 
diff --git a/tests/TopoSortTest.cpp b/tests/TopoSortTest.cpp
index 18ad75d..e45b6b8 100644
--- a/tests/TopoSortTest.cpp
+++ b/tests/TopoSortTest.cpp
@@ -9,9 +9,9 @@
 #include "SkTTopoSort.h"
 #include "Test.h"
 
-#include "sk_tool_utils.h"
+#include "ToolUtils.h"
 
-typedef void (*CreateGraphPF)(SkTArray<sk_sp<sk_tool_utils::TopoTestNode>>* graph);
+typedef void (*CreateGraphPF)(SkTArray<sk_sp<ToolUtils::TopoTestNode>>* graph);
 
 /* Simple diamond
  *       3
@@ -20,8 +20,8 @@
  *     \   /
  *       0
  */
-static void create_graph0(SkTArray<sk_sp<sk_tool_utils::TopoTestNode>>* graph) {
-    sk_tool_utils::TopoTestNode::AllocNodes(graph, 4);
+static void create_graph0(SkTArray<sk_sp<ToolUtils::TopoTestNode>>* graph) {
+    ToolUtils::TopoTestNode::AllocNodes(graph, 4);
 
     (*graph)[0]->dependsOn((*graph)[1].get());
     (*graph)[0]->dependsOn((*graph)[2].get());
@@ -38,8 +38,8 @@
  *     |
  *     0
  */
-static void create_graph1(SkTArray<sk_sp<sk_tool_utils::TopoTestNode>>* graph) {
-    sk_tool_utils::TopoTestNode::AllocNodes(graph, 4);
+static void create_graph1(SkTArray<sk_sp<ToolUtils::TopoTestNode>>* graph) {
+    ToolUtils::TopoTestNode::AllocNodes(graph, 4);
 
     (*graph)[0]->dependsOn((*graph)[1].get());
     (*graph)[1]->dependsOn((*graph)[2].get());
@@ -51,8 +51,8 @@
  *     /   \
  *    0 --- 1
  */
-static void create_graph2(SkTArray<sk_sp<sk_tool_utils::TopoTestNode>>* graph) {
-    sk_tool_utils::TopoTestNode::AllocNodes(graph, 3);
+static void create_graph2(SkTArray<sk_sp<ToolUtils::TopoTestNode>>* graph) {
+    ToolUtils::TopoTestNode::AllocNodes(graph, 3);
 
     (*graph)[0]->dependsOn((*graph)[1].get());
     (*graph)[1]->dependsOn((*graph)[2].get());
@@ -70,8 +70,8 @@
  *     \   /
  *       0
  */
-static void create_graph3(SkTArray<sk_sp<sk_tool_utils::TopoTestNode>>* graph) {
-    sk_tool_utils::TopoTestNode::AllocNodes(graph, 7);
+static void create_graph3(SkTArray<sk_sp<ToolUtils::TopoTestNode>>* graph) {
+    ToolUtils::TopoTestNode::AllocNodes(graph, 7);
 
     (*graph)[0]->dependsOn((*graph)[1].get());
     (*graph)[0]->dependsOn((*graph)[2].get());
@@ -91,8 +91,8 @@
  *     \   /       \   /
  *       0           4
  */
-static void create_graph4(SkTArray<sk_sp<sk_tool_utils::TopoTestNode>>* graph) {
-    sk_tool_utils::TopoTestNode::AllocNodes(graph, 8);
+static void create_graph4(SkTArray<sk_sp<ToolUtils::TopoTestNode>>* graph) {
+    ToolUtils::TopoTestNode::AllocNodes(graph, 8);
 
     (*graph)[0]->dependsOn((*graph)[1].get());
     (*graph)[0]->dependsOn((*graph)[2].get());
@@ -120,13 +120,13 @@
     };
 
     for (size_t i = 0; i < SK_ARRAY_COUNT(tests); ++i) {
-        SkTArray<sk_sp<sk_tool_utils::TopoTestNode>> graph;
+        SkTArray<sk_sp<ToolUtils::TopoTestNode>> graph;
 
         (tests[i].fCreate)(&graph);
 
-        sk_tool_utils::TopoTestNode::Shuffle(&graph, &rand);
+        ToolUtils::TopoTestNode::Shuffle(&graph, &rand);
 
-        bool actualResult = SkTTopoSort<sk_tool_utils::TopoTestNode>(&graph);
+        bool actualResult = SkTTopoSort<ToolUtils::TopoTestNode>(&graph);
         REPORTER_ASSERT(reporter, actualResult == tests[i].fExpectedResult);
 
         if (tests[i].fExpectedResult) {
diff --git a/tests/VerticesTest.cpp b/tests/VerticesTest.cpp
index b38a9de..52c2f33 100644
--- a/tests/VerticesTest.cpp
+++ b/tests/VerticesTest.cpp
@@ -136,7 +136,7 @@
     SkPoint pts[] = { { -10, 1 }, { -10, 2 }, { 1e9f, 1.5f } };
     fill_triangle(surf->getCanvas(), pts, SK_ColorBLACK);
 
-    sk_tool_utils::PixelIter iter(surf.get());
+    ToolUtils::PixelIter iter(surf.get());
     SkIPoint loc;
     while (void* addr = iter.next(&loc)) {
         SkPMColor c = *(SkPMColor*)addr;
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp
index a0400bf..297e82b 100644
--- a/tests/WritePixelsTest.cpp
+++ b/tests/WritePixelsTest.cpp
@@ -11,7 +11,7 @@
 #include "SkMathPriv.h"
 #include "SkSurface.h"
 #include "Test.h"
-#include "sk_tool_utils.h"
+#include "ToolUtils.h"
 
 #include "GrBackendSurface.h"
 #include "GrContext.h"
@@ -396,7 +396,7 @@
                                                        rect.height(), SkToBool(tightBmp)));
                 uint32_t idBefore = surface->generationID();
 
-                // sk_tool_utils::write_pixels(&canvas, bmp, rect.fLeft, rect.fTop, ct, at);
+                // ToolUtils::write_pixels(&canvas, bmp, rect.fLeft, rect.fTop, ct, at);
                 surface->writePixels(bmp, rect.fLeft, rect.fTop);
 
                 uint32_t idAfter = surface->generationID();