ccpr: Make curve corners more seamless

Interpolates the acual curve's local coverage values from the corner
box vertices, rather than an approximation based on the tangent.
Clamps curve segment total coverage values above 0. This prevents us
from using negative coverage (which is obviously wrong) when the curve
approximation function is slightly inaccurate. Moves
GrCCTriangleShader.h into GrCCCoverageProcessor.cpp.

Bug: skia:
Change-Id: I95de8e940c1508d4a359f5f802c3a688f2b84094
Reviewed-on: https://skia-review.googlesource.com/119066
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/ccpr/GrCCQuadraticShader.h b/src/gpu/ccpr/GrCCQuadraticShader.h
index 30c5230..daf9eee 100644
--- a/src/gpu/ccpr/GrCCQuadraticShader.h
+++ b/src/gpu/ccpr/GrCCQuadraticShader.h
@@ -21,21 +21,25 @@
  * (Use GrCCGeometry::quadraticTo().)
  */
 class GrCCQuadraticShader : public GrCCCoverageProcessor::Shader {
-protected:
+public:
     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) override;
+                        const char* cornerCoverage) override;
 
     void onEmitFragmentCode(GrGLSLFPFragmentBuilder*, const char* outputCoverage) const override;
 
+private:
+    void calcHullCoverage(SkString* code, const char* coordAndGrad, const char* d,
+                          const char* outputCoverage) const;
+
     const GrShaderVar fQCoordMatrix{"qcoord_matrix", kFloat2x2_GrSLType};
     const GrShaderVar fQCoord0{"qcoord0", kFloat2_GrSLType};
     const GrShaderVar fEdgeDistanceEquation{"edge_distance_equation", kFloat3_GrSLType};
-    GrGLSLVarying fCoord;
-    GrGLSLVarying fCoverages;
+    GrGLSLVarying fCoord_fGrad;
+    GrGLSLVarying fEdge_fWind_fCorner;
 };
 
 #endif