can we remove these entirely?

Change-Id: I3dbf9c25e6e0025cc1686789a089420ebce72bbd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280191
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 7d4069c..4667c5a 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -2513,17 +2513,8 @@
     virtual void onDrawPoints(PointMode mode, size_t count, const SkPoint pts[],
                               const SkPaint& paint);
 
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-    virtual void onDrawVerticesObject(const SkVertices* vertices, SkBlendMode mode,
-                                      const SkPaint& paint) {
-        this->onDrawVerticesObject(vertices, nullptr, 0, mode, paint);
-    }
-    virtual void onDrawVerticesObject(const SkVertices* vertices, const SkVertices::Bone bones[],
-                                      int boneCount, SkBlendMode mode, const SkPaint& paint);
-#else
     virtual void onDrawVerticesObject(const SkVertices* vertices, SkBlendMode mode,
                                       const SkPaint& paint);
-#endif
     virtual void onDrawImage(const SkImage* image, SkScalar dx, SkScalar dy, const SkPaint* paint);
     virtual void onDrawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst,
                                  const SkPaint* paint, SrcRectConstraint constraint);
@@ -2532,16 +2523,6 @@
     virtual void onDrawImageLattice(const SkImage* image, const Lattice& lattice, const SkRect& dst,
                                     const SkPaint* paint);
 
-#ifdef SK_SUPPORT_LEGACY_ONDRAWBITMAP_VIRTUALS
-    // these are no longer called, so clients should stop overriding them
-    virtual void onDrawBitmap(const SkBitmap&, SkScalar, SkScalar, const SkPaint*) {}
-    virtual void onDrawBitmapRect(const SkBitmap&, const SkRect*, const SkRect&, const SkPaint*,
-                                  SkCanvas::SrcRectConstraint) {}
-    virtual void onDrawBitmapNine(const SkBitmap&, const SkIRect&, const SkRect&, const SkPaint*) {}
-    virtual void onDrawBitmapLattice(const SkBitmap&, const SkCanvas::Lattice&, const SkRect&,
-                                     const SkPaint*) {}
-#endif
-
     virtual void onDrawAtlas(const SkImage* atlas, const SkRSXform xform[], const SkRect rect[],
                              const SkColor colors[], int count, SkBlendMode mode,
                              const SkRect* cull, const SkPaint* paint);
diff --git a/include/core/SkOverdrawCanvas.h b/include/core/SkOverdrawCanvas.h
index 23377fa..0b792df 100644
--- a/include/core/SkOverdrawCanvas.h
+++ b/include/core/SkOverdrawCanvas.h
@@ -33,12 +33,7 @@
     void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override;
     void onDrawRRect(const SkRRect&, const SkPaint&) override;
     void onDrawPoints(PointMode, size_t, const SkPoint[], const SkPaint&) override;
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-    void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone bones[], int boneCount,
-                              SkBlendMode, const SkPaint&) override;
-#else
     void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
-#endif
     void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[],
                      int, SkBlendMode, const SkRect*, const SkPaint*) override;
     void onDrawPath(const SkPath&, const SkPaint&) override;
diff --git a/include/utils/SkLuaCanvas.h b/include/utils/SkLuaCanvas.h
index ae00ddc..1c162f9 100644
--- a/include/utils/SkLuaCanvas.h
+++ b/include/utils/SkLuaCanvas.h
@@ -48,12 +48,7 @@
     void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override;
     void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst,
                          const SkPaint*, SrcRectConstraint) override;
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-    void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone bones[], int boneCount,
-                              SkBlendMode, const SkPaint&) override;
-#else
     void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
-#endif
     void onClipRect(const SkRect&, SkClipOp, ClipEdgeStyle) override;
     void onClipRRect(const SkRRect&, SkClipOp, ClipEdgeStyle) override;
     void onClipPath(const SkPath&, SkClipOp, ClipEdgeStyle) override;
diff --git a/include/utils/SkNWayCanvas.h b/include/utils/SkNWayCanvas.h
index 4c1130c..e1b91ca 100644
--- a/include/utils/SkNWayCanvas.h
+++ b/include/utils/SkNWayCanvas.h
@@ -58,12 +58,7 @@
     void onDrawImageLattice(const SkImage*, const Lattice&, const SkRect&, const SkPaint*) override;
     void onDrawImageNine(const SkImage*, const SkIRect& center, const SkRect& dst,
                          const SkPaint*) override;
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-    void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone bones[], int boneCount,
-                              SkBlendMode, const SkPaint&) override;
-#else
     void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
-#endif
     void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[],
                      int, SkBlendMode, const SkRect*, const SkPaint*) override;
     void onDrawShadowRec(const SkPath&, const SkDrawShadowRec&) override;
diff --git a/include/utils/SkNoDrawCanvas.h b/include/utils/SkNoDrawCanvas.h
index 86dfd77..74e283e 100644
--- a/include/utils/SkNoDrawCanvas.h
+++ b/include/utils/SkNoDrawCanvas.h
@@ -60,12 +60,7 @@
     void onDrawImageNine(const SkImage*, const SkIRect&, const SkRect&, const SkPaint*) override {}
     void onDrawImageLattice(const SkImage*, const Lattice&, const SkRect&,
                             const SkPaint*) override {}
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-    void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone bones[], int boneCount,
-                              SkBlendMode, const SkPaint&) override {}
-#else
     void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override {}
-#endif
     void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[],
                      int, SkBlendMode, const SkRect*, const SkPaint*) override {}
     void onDrawShadowRec(const SkPath&, const SkDrawShadowRec&) override {}
diff --git a/include/utils/SkPaintFilterCanvas.h b/include/utils/SkPaintFilterCanvas.h
index 76e8efd..4b80709 100644
--- a/include/utils/SkPaintFilterCanvas.h
+++ b/include/utils/SkPaintFilterCanvas.h
@@ -67,12 +67,7 @@
                          const SkPaint*) override;
     void onDrawImageLattice(const SkImage*, const Lattice&, const SkRect&,
                             const SkPaint*) override;
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-    void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone bones[], int boneCount,
-                              SkBlendMode, const SkPaint&) override;
-#else
     void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
-#endif
     void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
                              const SkPoint texCoords[4], SkBlendMode,
                              const SkPaint& paint) override;
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 85a1bcb..4a94695 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -2649,19 +2649,6 @@
     this->onDrawTextBlob(blob, x, y, paint);
 }
 
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-void SkCanvas::onDrawVerticesObject(const SkVertices* vertices, const SkVertices::Bone bones[],
-                                    int boneCount, SkBlendMode bmode, const SkPaint& paint) {
-    DRAW_BEGIN(paint, nullptr)
-
-    while (iter.next()) {
-        // In the common case of one iteration we could std::move vertices here.
-        iter.fDevice->drawVertices(vertices, bmode, draw.paint());
-    }
-
-    DRAW_END
-}
-#else
 void SkCanvas::onDrawVerticesObject(const SkVertices* vertices, SkBlendMode bmode,
                                     const SkPaint& paint) {
     DRAW_BEGIN(paint, nullptr)
@@ -2673,7 +2660,6 @@
 
     DRAW_END
 }
-#endif
 
 void SkCanvas::drawPatch(const SkPoint cubics[12], const SkColor colors[4],
                          const SkPoint texCoords[4], SkBlendMode bmode,
diff --git a/src/core/SkOverdrawCanvas.cpp b/src/core/SkOverdrawCanvas.cpp
index 8fa3cd0..0297a97 100644
--- a/src/core/SkOverdrawCanvas.cpp
+++ b/src/core/SkOverdrawCanvas.cpp
@@ -131,24 +131,10 @@
     fList[0]->onDrawPoints(mode, count, points, this->overdrawPaint(paint));
 }
 
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-void SkOverdrawCanvas::onDrawVerticesObject(const SkVertices* vertices,
-                                            const SkVertices::Bone bones[], int boneCount,
-                                            SkBlendMode blendMode, const SkPaint& paint) {
-    fList[0]->onDrawVerticesObject(vertices,
-                                   bones,
-                                   boneCount,
-                                   blendMode,
-                                   this->overdrawPaint(paint));
-}
-#else
 void SkOverdrawCanvas::onDrawVerticesObject(const SkVertices* vertices,
                                             SkBlendMode blendMode, const SkPaint& paint) {
-    fList[0]->onDrawVerticesObject(vertices,
-                                   blendMode,
-                                   this->overdrawPaint(paint));
+    fList[0]->onDrawVerticesObject(vertices, blendMode, this->overdrawPaint(paint));
 }
-#endif
 
 void SkOverdrawCanvas::onDrawAtlas(const SkImage* image, const SkRSXform xform[],
                                    const SkRect texs[], const SkColor colors[], int count,
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index 5fbb05c..7463fc0 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -662,9 +662,6 @@
 }
 
 void SkPictureRecord::onDrawVerticesObject(const SkVertices* vertices,
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-                                           const SkVertices::Bone bones[], int boneCount,
-#endif
                                            SkBlendMode mode, const SkPaint& paint) {
     // op + paint index + vertices index + zero_bones + mode
     size_t size = 5 * kUInt32Size;
diff --git a/src/core/SkPictureRecord.h b/src/core/SkPictureRecord.h
index 2839650..b0d0202 100644
--- a/src/core/SkPictureRecord.h
+++ b/src/core/SkPictureRecord.h
@@ -196,12 +196,7 @@
                             const SkPaint*) override;
 
     void onDrawShadowRec(const SkPath&, const SkDrawShadowRec&) override;
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-    void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone bones[], int boneCount,
-                              SkBlendMode, const SkPaint&) override;
-#else
     void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
-#endif
 
     void onClipRect(const SkRect&, SkClipOp, ClipEdgeStyle) override;
     void onClipRRect(const SkRRect&, SkClipOp, ClipEdgeStyle) override;
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp
index 22d9554..325bb38 100644
--- a/src/core/SkRecorder.cpp
+++ b/src/core/SkRecorder.cpp
@@ -244,21 +244,12 @@
     }
 }
 
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-void SkRecorder::onDrawVerticesObject(const SkVertices* vertices, const SkVertices::Bone bones[],
-                                      int boneCount, SkBlendMode bmode, const SkPaint& paint) {
-    this->append<SkRecords::DrawVertices>(paint,
-                                          sk_ref_sp(const_cast<SkVertices*>(vertices)),
-                                          bmode);
-}
-#else
 void SkRecorder::onDrawVerticesObject(const SkVertices* vertices, SkBlendMode bmode,
                                       const SkPaint& paint) {
     this->append<SkRecords::DrawVertices>(paint,
                                           sk_ref_sp(const_cast<SkVertices*>(vertices)),
                                           bmode);
 }
-#endif
 
 void SkRecorder::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
                              const SkPoint texCoords[4], SkBlendMode bmode,
diff --git a/src/core/SkRecorder.h b/src/core/SkRecorder.h
index 977288c..51b4dbf 100644
--- a/src/core/SkRecorder.h
+++ b/src/core/SkRecorder.h
@@ -99,12 +99,7 @@
                          const SkPaint*) override;
     void onDrawImageLattice(const SkImage*, const Lattice& lattice, const SkRect& dst,
                             const SkPaint*) override;
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-    void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone bones[], int boneCount,
-                              SkBlendMode, const SkPaint&) override;
-#else
     void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
-#endif
     void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[],
                      int count, SkBlendMode, const SkRect* cull, const SkPaint*) override;
     void onDrawShadowRec(const SkPath&, const SkDrawShadowRec&) override;
diff --git a/src/utils/SkLuaCanvas.cpp b/src/utils/SkLuaCanvas.cpp
index 841dd9a..a73e295 100644
--- a/src/utils/SkLuaCanvas.cpp
+++ b/src/utils/SkLuaCanvas.cpp
@@ -271,15 +271,7 @@
     this->INHERITED::onDrawDrawable(drawable, matrix);
 }
 
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-void SkLuaCanvas::onDrawVerticesObject(const SkVertices*, const SkVertices::Bone[], int,
-                                       SkBlendMode, const SkPaint& paint) {
-    AUTO_LUA("drawVertices");
-    lua.pushPaint(paint, "paint");
-}
-#else
 void SkLuaCanvas::onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint& paint) {
     AUTO_LUA("drawVertices");
     lua.pushPaint(paint, "paint");
 }
-#endif
diff --git a/src/utils/SkNWayCanvas.cpp b/src/utils/SkNWayCanvas.cpp
index 3400e53..32b0021 100644
--- a/src/utils/SkNWayCanvas.cpp
+++ b/src/utils/SkNWayCanvas.cpp
@@ -296,9 +296,6 @@
 }
 
 void SkNWayCanvas::onDrawVerticesObject(const SkVertices* vertices,
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-                                        const SkVertices::Bone bones[], int boneCount,
-#endif
                                         SkBlendMode bmode, const SkPaint& paint) {
     Iter iter(fList);
     while (iter.next()) {
diff --git a/src/utils/SkPaintFilterCanvas.cpp b/src/utils/SkPaintFilterCanvas.cpp
index b75667c..7226e0a 100644
--- a/src/utils/SkPaintFilterCanvas.cpp
+++ b/src/utils/SkPaintFilterCanvas.cpp
@@ -149,17 +149,10 @@
 }
 
 void SkPaintFilterCanvas::onDrawVerticesObject(const SkVertices* vertices,
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-                                               const SkVertices::Bone bones[], int boneCount,
-#endif
                                                SkBlendMode bmode, const SkPaint& paint) {
     AutoPaintFilter apf(this, paint);
     if (apf.shouldDraw()) {
-        this->SkNWayCanvas::onDrawVerticesObject(vertices,
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-                                                 bones, boneCount,
-#endif
-                                                 bmode, apf.paint());
+        this->SkNWayCanvas::onDrawVerticesObject(vertices, bmode, apf.paint());
     }
 }
 
diff --git a/tools/debugger/DebugCanvas.cpp b/tools/debugger/DebugCanvas.cpp
index 64f432d..43cb9c0 100644
--- a/tools/debugger/DebugCanvas.cpp
+++ b/tools/debugger/DebugCanvas.cpp
@@ -490,24 +490,12 @@
     this->addDrawCommand(new DrawPatchCommand(cubics, colors, texCoords, bmode, paint));
 }
 
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-void DebugCanvas::onDrawVerticesObject(const SkVertices*      vertices,
-                                       const SkVertices::Bone bones[],
-                                       int                    boneCount,
-                                       SkBlendMode            bmode,
-                                       const SkPaint&         paint) {
-    // TODO: ANIMATION NOT LOGGED
-    this->addDrawCommand(
-            new DrawVerticesCommand(sk_ref_sp(const_cast<SkVertices*>(vertices)), bmode, paint));
-}
-#else
 void DebugCanvas::onDrawVerticesObject(const SkVertices*      vertices,
                                        SkBlendMode            bmode,
                                        const SkPaint&         paint) {
     this->addDrawCommand(
             new DrawVerticesCommand(sk_ref_sp(const_cast<SkVertices*>(vertices)), bmode, paint));
 }
-#endif
 
 void DebugCanvas::onDrawAtlas(const SkImage*  image,
                               const SkRSXform xform[],
diff --git a/tools/debugger/DebugCanvas.h b/tools/debugger/DebugCanvas.h
index bbb73b9..817aca4 100644
--- a/tools/debugger/DebugCanvas.h
+++ b/tools/debugger/DebugCanvas.h
@@ -157,12 +157,7 @@
     void onDrawArc(const SkRect&, SkScalar, SkScalar, bool, const SkPaint&) override;
     void onDrawRRect(const SkRRect&, const SkPaint&) override;
     void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override;
-#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
-    void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone bones[], int boneCount,
-                              SkBlendMode, const SkPaint&) override;
-#else
     void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
-#endif
     void onDrawPath(const SkPath&, const SkPaint&) override;
     void onDrawRegion(const SkRegion&, const SkPaint&) override;
     void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override;