Store the correct number of samples in GrProgramInfo

Bug: skia:11396
Change-Id: I9480b89635bd7a6bdff8ab4876c8eeafdbc27c8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442096
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/ops/PathTessellateOp.cpp b/src/gpu/ops/PathTessellateOp.cpp
index 801e445..6249a22 100644
--- a/src/gpu/ops/PathTessellateOp.cpp
+++ b/src/gpu/ops/PathTessellateOp.cpp
@@ -46,8 +46,11 @@
                                     const GrDstProxyView& dstProxyView,
                                     GrXferBarrierFlags renderPassXferBarriers,
                                     GrLoadOp colorLoadOp) {
-    this->prepareTessellator({context->priv().recordTimeAllocator(), writeView, &dstProxyView,
-                             renderPassXferBarriers, colorLoadOp, context->priv().caps()},
+    // DMSAA is not supported on DDL.
+    bool usesMSAASurface = writeView.asRenderTargetProxy()->numSamples() > 1;
+    this->prepareTessellator({context->priv().recordTimeAllocator(), writeView, usesMSAASurface,
+                             &dstProxyView, renderPassXferBarriers, colorLoadOp,
+                             context->priv().caps()},
                              (clip) ? std::move(*clip) : GrAppliedClip::Disabled());
     SkASSERT(fTessellationProgram);
     context->priv().recordProgramInfo(fTessellationProgram);
@@ -56,9 +59,9 @@
 void PathTessellateOp::onPrepare(GrOpFlushState* flushState) {
     if (!fTessellator) {
         this->prepareTessellator({flushState->allocator(), flushState->writeView(),
-                                  &flushState->dstProxyView(), flushState->renderPassBarriers(),
-                                  flushState->colorLoadOp(), &flushState->caps()},
-                                  flushState->detachAppliedClip());
+                                 flushState->usesMSAASurface(), &flushState->dstProxyView(),
+                                 flushState->renderPassBarriers(), flushState->colorLoadOp(),
+                                 &flushState->caps()}, flushState->detachAppliedClip());
         SkASSERT(fTessellator);
     }
     fTessellator->prepare(flushState, this->bounds(), {SkMatrix::I(), fPath}, fPath.countVerbs());