ccpr: Replace curve corner MSAA with analytic attenuation

Begins using the new triangle corner algorithm on curves as well.
Updates the vertex backend to render curves in a single pass.
Simplifies the cubic and quadratic shaders. Removes all code related to
sample locations.

Bug: skia:
Change-Id: I96c6c401be765e96a8fe087deb7f84760e68dcf0
Reviewed-on: https://skia-review.googlesource.com/115746
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/ccpr/GrCCCubicShader.h b/src/gpu/ccpr/GrCCCubicShader.h
index dff7f6b..39ca55f 100644
--- a/src/gpu/ccpr/GrCCCubicShader.h
+++ b/src/gpu/ccpr/GrCCCubicShader.h
@@ -19,43 +19,23 @@
  *
  * The provided curve segments must be convex, monotonic with respect to the vector of their closing
  * edge [P3 - P0], and must not contain or be near any inflection points or loop intersections.
- * (Use GrCCGeometry.)
+ * (Use GrCCGeometry::cubicTo().)
  */
 class GrCCCubicShader : public GrCCCoverageProcessor::Shader {
-protected:
-    void emitSetupCode(GrGLSLVertexGeoBuilder*, const char* pts, const char* repetitionID,
-                       const char* wind, GeometryVars*) const final;
-    virtual void onEmitSetupCode(GrGLSLVertexGeoBuilder*, const char* pts, const char* repetitionID,
-                                 GeometryVars*) const {}
+    void emitSetupCode(GrGLSLVertexGeoBuilder*, const char* pts, const char* wind,
+                       const char** tighterHull) const override;
 
     void onEmitVaryings(GrGLSLVaryingHandler*, GrGLSLVarying::Scope, SkString* code,
-                        const char* position, const char* coverage, const char* attenuatedCoverage,
-                        const char* wind) final;
-    virtual void onEmitVaryings(GrGLSLVaryingHandler*, GrGLSLVarying::Scope, SkString* code) = 0;
+                        const char* position, const char* coverage,
+                        const char* attenuatedCoverage) override;
 
-    void onEmitFragmentCode(GrGLSLFPFragmentBuilder*, const char* outputCoverage) const final;
-    virtual void emitCoverage(GrGLSLFPFragmentBuilder*, const char* outputCoverage) const = 0;
+    void onEmitFragmentCode(GrGLSLFPFragmentBuilder*, const char* outputCoverage) const override;
 
-    GrShaderVar fKLMMatrix{"klm_matrix", kFloat3x3_GrSLType};
-    GrShaderVar fEdgeDistanceEquation{"edge_distance_equation", kFloat3_GrSLType};
+    const GrShaderVar fKLMMatrix{"klm_matrix", kFloat3x3_GrSLType};
+    const GrShaderVar fEdgeDistanceEquation{"edge_distance_equation", kFloat3_GrSLType};
     GrGLSLVarying fKLMD;
-};
-
-class GrCCCubicHullShader : public GrCCCubicShader {
-    void onEmitVaryings(GrGLSLVaryingHandler*, GrGLSLVarying::Scope, SkString* code) override;
-    void emitCoverage(GrGLSLFPFragmentBuilder*, const char* outputCoverage) const override;
-
     GrGLSLVarying fGradMatrix;
-};
-
-class GrCCCubicCornerShader : public GrCCCubicShader {
-    void onEmitSetupCode(GrGLSLVertexGeoBuilder*, const char* pts, const char* repetitionID,
-                         GeometryVars*) const override;
-    void onEmitVaryings(GrGLSLVaryingHandler*, GrGLSLVarying::Scope, SkString* code) override;
-    void emitCoverage(GrGLSLFPFragmentBuilder*, const char* outputCoverage) const override;
-
-    GrGLSLVarying fdKLMDdx;
-    GrGLSLVarying fdKLMDdy;
+    GrGLSLVarying fCornerCoverage;
 };
 
 #endif