ccpr: Add an MSAA atlas mode

Adds the option to use a multisampled (or mixed sampled) atlas, and
uses the sample mask and stencil buffer instead of coverage counts.

Bug: skia:
Change-Id: I9fb76d17895ae25208124f6c27e37977ac31b5eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227428
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/ccpr/GrCCCoverageProcessor.cpp b/src/gpu/ccpr/GrCCCoverageProcessor.cpp
index 9075e52..cd635e4 100644
--- a/src/gpu/ccpr/GrCCCoverageProcessor.cpp
+++ b/src/gpu/ccpr/GrCCCoverageProcessor.cpp
@@ -33,7 +33,8 @@
         }
     }
 
-    void onEmitFragmentCode(GrGLSLFPFragmentBuilder* f, const char* outputCoverage) const override {
+    void emitFragmentCoverageCode(
+            GrGLSLFPFragmentBuilder* f, const char* outputCoverage) const override {
         if (kHalf_GrSLType == fCoverages.type()) {
             f->codeAppendf("%s = %s;", outputCoverage, fCoverages.fsIn());
         } else {
@@ -42,6 +43,8 @@
         }
     }
 
+    void emitSampleMaskCode(GrGLSLFPFragmentBuilder*) const override { return; }
+
     GrGLSLVarying fCoverages;
 };
 
@@ -192,15 +195,6 @@
     return this->onCreateGLSLInstance(std::move(shader));
 }
 
-void GrCCCoverageProcessor::Shader::emitFragmentCode(
-        const GrCCCoverageProcessor& proc, GrGLSLFPFragmentBuilder* f, const char* skOutputColor,
-        const char* skOutputCoverage) const {
-    f->codeAppendf("half coverage = 0;");
-    this->onEmitFragmentCode(f, "coverage");
-    f->codeAppendf("%s.a = coverage;", skOutputColor);
-    f->codeAppendf("%s = half4(1);", skOutputCoverage);
-}
-
 void GrCCCoverageProcessor::draw(
         GrOpFlushState* flushState, const GrPipeline& pipeline, const SkIRect scissorRects[],
         const GrMesh meshes[], int meshCount, const SkRect& drawBounds) const {