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/PathInnerTriangulateOp.cpp b/src/gpu/ops/PathInnerTriangulateOp.cpp
index 18a4f6c..9e8d1b8 100644
--- a/src/gpu/ops/PathInnerTriangulateOp.cpp
+++ b/src/gpu/ops/PathInnerTriangulateOp.cpp
@@ -367,8 +367,11 @@
                                           const GrDstProxyView& dstProxyView,
                                           GrXferBarrierFlags renderPassXferBarriers,
                                           GrLoadOp colorLoadOp) {
-    this->prePreparePrograms({context->priv().recordTimeAllocator(), writeView, &dstProxyView,
-                             renderPassXferBarriers, colorLoadOp, context->priv().caps()},
+    // DMSAA is not supported on DDL.
+    bool usesMSAASurface = writeView.asRenderTargetProxy()->numSamples() > 1;
+    this->prePreparePrograms({context->priv().recordTimeAllocator(), writeView, usesMSAASurface,
+                             &dstProxyView, renderPassXferBarriers, colorLoadOp,
+                             context->priv().caps()},
                              (clip) ? std::move(*clip) : GrAppliedClip::Disabled());
     if (fStencilCurvesProgram) {
         context->priv().recordProgramInfo(fStencilCurvesProgram);
@@ -386,9 +389,9 @@
 void PathInnerTriangulateOp::onPrepare(GrOpFlushState* flushState) {
     if (!fFanTriangulator) {
         this->prePreparePrograms({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());
         if (!fFanTriangulator) {
             return;
         }