hide drawpostext etc.

Bug: skia:
Change-Id: I918f732072af9a1f6f2ebd94cc53eeb5d6a0d5b8
Reviewed-on: https://skia-review.googlesource.com/c/180361
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index f847dc2..297e4b0 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -1921,6 +1921,7 @@
     */
     void drawString(const SkString& string, SkScalar x, SkScalar y, const SkPaint& paint);
 
+#ifdef SK_SUPPORT_LEGACY_DRAWPOSTTEXT
     /** Draws each glyph in text with the origin in pos array, using clip, SkMatrix, and
         SkPaint paint. The number of entries in pos array must match the number of glyphs
         described by byteLength of text.
@@ -1993,6 +1994,7 @@
     */
     void drawTextRSXform(const void* text, size_t byteLength, const SkRSXform xform[],
                          const SkRect* cullRect, const SkPaint& paint);
+#endif
 
     /** Draws SkTextBlob blob at (x, y), using clip, SkMatrix, and SkPaint paint.
 
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index b48e2c4..b24a9a2 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -2562,6 +2562,7 @@
         this->drawTextBlob(SkTextBlob::MakeFromText(text, byteLength, font, encoding), x, y, paint);
     }
 }
+#ifdef SK_SUPPORT_LEGACY_DRAWPOSTTEXT
 void SkCanvas::drawPosText(const void* text, size_t byteLength, const SkPoint pos[],
                            const SkPaint& paint) {
     TRACE_EVENT0("skia", TRACE_FUNC);
@@ -2594,6 +2595,7 @@
                            0, 0, paint);
     }
 }
+#endif
 void SkCanvas::drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
                             const SkPaint& paint) {
     TRACE_EVENT0("skia", TRACE_FUNC);
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index 9a3841e..c6066b6 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -624,15 +624,18 @@
             uint32_t flags = reader->readUInt();
             TextContainer text(reader, paint);
             const SkRSXform* xform = (const SkRSXform*)reader->skip(count, sizeof(SkRSXform));
-            const SkRect* cull = nullptr;
             if (flags & DRAW_TEXT_RSXFORM_HAS_CULL) {
-                cull = (const SkRect*)reader->skip(sizeof(SkRect));
+                // skip past cull rect
+                (void)reader->skip(sizeof(SkRect));
             }
             reader->validate(count == text.count());
             BREAK_ON_READ_ERROR(reader);
 
             if (text.text()) {
-                canvas->drawTextRSXform(text.text(), text.length(), xform, cull, *paint);
+                SkFont font = SkFont::LEGACY_ExtractFromPaint(*paint);
+                auto blob = SkTextBlob::MakeFromRSXform(text.text(), text.length(), xform, font,
+                                                        paint->getTextEncoding());
+                canvas->drawTextBlob(blob, 0, 0, *paint);
             }
         } break;
         case DRAW_VERTICES_OBJECT: {
diff --git a/tests/SkLiteDLTest.cpp b/tests/SkLiteDLTest.cpp
index 657fd03..e64e5aa 100644
--- a/tests/SkLiteDLTest.cpp
+++ b/tests/SkLiteDLTest.cpp
@@ -63,28 +63,3 @@
     canvas.flush();
     REPORTER_ASSERT(r, !dl.empty());
 }
-
-// skia:7133 regression test.
-// At one point we recorded text before the transforms, which makes it easy for
-// the recording buffer to not be suitably aligned for the transforms.
-DEF_TEST(SkLiteRecorder_RSXformAlignment, r) {
-    SkLiteDL dl;
-    SkLiteRecorder canvas;
-    canvas.reset(&dl, {0,0,100,100});
-
-    SkPaint paint;
-    paint.setTextEncoding(kUTF8_SkTextEncoding);
-
-    // These values don't really matter... we just need 5 valid transforms.
-    SkRSXform xforms[] = {
-        {1,0, 1,1},
-        {1,0, 2,2},
-        {1,0, 3,3},
-        {1,0, 4,4},
-        {1,0, 5,5},
-    };
-    canvas.drawTextRSXform("hello", 5, xforms, nullptr, paint);
-
-    // We're just checking that this recorded our draw without SkASSERTing in Debug builds.
-    REPORTER_ASSERT(r, !dl.empty());
-}