Improve SkVerticesPriv ergonomics

Rather than two separate (partially overlapping) ways of accessing the
private portions of SkVertices, use a single privileged helper class
(similar to GrContextPriv).

Change-Id: I76b14b63088658ed8726719cce126577e5a52078
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280601
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index c6a25d6..85a1bcb 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1986,16 +1986,13 @@
     TRACE_EVENT0("skia", TRACE_FUNC);
     RETURN_ON_NULL(vertices);
 
-    SkVertices::Info info;
-    vertices->getInfo(&info);
-
     // We expect fans to be converted to triangles when building or deserializing SkVertices.
-    SkASSERT(info.fMode != SkVertices::kTriangleFan_VertexMode);
+    SkASSERT(vertices->priv().mode() != SkVertices::kTriangleFan_VertexMode);
 
     // If the vertices contain custom attributes, ensure they line up with the paint's shader
     const SkRuntimeEffect* effect =
             paint.getShader() ? as_SB(paint.getShader())->asRuntimeEffect() : nullptr;
-    if (info.fPerVertexDataCount != (effect ? effect->varyingCount() : 0)) {
+    if (vertices->priv().perVertexDataCount() != (effect ? effect->varyingCount() : 0)) {
         return;
     }