Use SkTextEncoding enum instead of macros.

Change-Id: I4b6259590fa0693ee0522b4999a1c0fe250b173d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212504
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
diff --git a/gm/drawatlas.cpp b/gm/drawatlas.cpp
index 3042472..132fd5b 100644
--- a/gm/drawatlas.cpp
+++ b/gm/drawatlas.cpp
@@ -132,7 +132,7 @@
                               float baseline_offset) {
     SkPathMeasure meas(path, false);
 
-    int count = font.countText(text, length, kUTF8_SkTextEncoding);
+    int count = font.countText(text, length, SkTextEncoding::kUTF8);
     size_t size = count * (sizeof(SkRSXform) + sizeof(SkScalar));
     SkAutoSMalloc<512> storage(size);
     SkRSXform* xform = (SkRSXform*)storage.get();
@@ -145,7 +145,7 @@
     const SkRect bounds = path.getBounds().makeOutset(max, max);
 
     SkAutoTArray<SkGlyphID> glyphs(count);
-    font.textToGlyphs(text, length, kUTF8_SkTextEncoding, glyphs.get(), count);
+    font.textToGlyphs(text, length, SkTextEncoding::kUTF8, glyphs.get(), count);
     font.getWidths(glyphs.get(), count, widths);
 
     for (int i = 0; i < count; ++i) {
@@ -166,7 +166,7 @@
     }
 
     canvas->drawTextBlob(SkTextBlob::MakeFromRSXform(glyphs.get(), count * sizeof(SkGlyphID),
-                                         &xform[0], font, kGlyphID_SkTextEncoding),
+                                         &xform[0], font, SkTextEncoding::kGlyphID),
                          0, 0, paint);
 
     if (true) {
@@ -202,7 +202,7 @@
     SkScalar x = 0;
     for (int i = 0; i < N; ++i) {
         pos[i].set(x, 0);
-        x += font.measureText(&text0[i], 1, kUTF8_SkTextEncoding, nullptr, &paint);
+        x += font.measureText(&text0[i], 1, SkTextEncoding::kUTF8, nullptr, &paint);
     }
 
     SkPath path;