CCPR: Process quadratic flat edges without soft msaa

The artifacts previously thought to require msaa can be handled by
(1) converting near-linear quadratics into lines, and (2) ensuring all
quadratic segments are monotonic with respect to the vector of their
closing edge [P2 -> P0].

No. 1 was already in effect.

No. 2 is implemented by this change.

Now we only fall back on soft msaa for the two corner pixels.

This change also does some generic housekeeping in the quadratic
processor.

Bug: skia:
Change-Id: Ib3309c2ed86d3d8bec5f451125a69326e82eeb1c
Reviewed-on: https://skia-review.googlesource.com/29721
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/ccpr/GrCCPRCoverageProcessor.h b/src/gpu/ccpr/GrCCPRCoverageProcessor.h
index befa1a9..c9198d3 100644
--- a/src/gpu/ccpr/GrCCPRCoverageProcessor.h
+++ b/src/gpu/ccpr/GrCCPRCoverageProcessor.h
@@ -75,7 +75,7 @@
 
         // Quadratics.
         kQuadraticHulls,
-        kQuadraticFlatEdges,
+        kQuadraticCorners,
 
         // Cubics.
         kSerpentineInsets,
@@ -220,6 +220,14 @@
     void emitEdgeDistanceEquation(GrGLSLGeometryBuilder*, const char* leftPt, const char* rightPt,
                                   const char* outputDistanceEquation) const;
 
+    // Emits the conservative raster of a single point (i.e. pixel-size box centered on the point).
+    // Coverage is +1 all around.
+    //
+    // Geometry shader must be configured to output triangle strips.
+    //
+    // Returns the number of vertices that were emitted.
+    int emitCornerGeometry(GrGLSLGeometryBuilder*, const char* emitVertexFn, const char* pt) const;
+
     // Defines a global float2 array that contains MSAA sample locations as offsets from pixel
     // center. Subclasses can use this for software multisampling.
     //