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/GrDrawAtlasPathOp.cpp b/src/gpu/ops/GrDrawAtlasPathOp.cpp
index 0bd069d..7c63571 100644
--- a/src/gpu/ops/GrDrawAtlasPathOp.cpp
+++ b/src/gpu/ops/GrDrawAtlasPathOp.cpp
@@ -158,8 +158,9 @@
                                             std::move(appliedClip));
     auto shader = arena->make<DrawAtlasPathShader>(fUsesLocalCoords, &fAtlasHelper,
                                                    *caps.shaderCaps());
-    fProgram = arena->make<GrProgramInfo>(writeView, pipeline, &GrUserStencilSettings::kUnused,
-                                          shader, GrPrimitiveType::kTriangleStrip, 0,
+    fProgram = arena->make<GrProgramInfo>(caps, writeView, usesMSAASurface, pipeline,
+                                          &GrUserStencilSettings::kUnused, shader,
+                                          GrPrimitiveType::kTriangleStrip, 0,
                                           renderPassXferBarriers, colorLoadOp);
 }
 
@@ -168,10 +169,11 @@
                                      GrAppliedClip* appliedClip, const GrDstProxyView& dstProxyView,
                                      GrXferBarrierFlags renderPassXferBarriers,
                                      GrLoadOp colorLoadOp) {
+    // DMSAA is not supported on DDL.
+    bool usesMSAASurface = writeView.asRenderTargetProxy()->numSamples() > 1;
     this->prepareProgram(*rContext->priv().caps(), rContext->priv().recordTimeAllocator(),
-                         writeView, writeView.asRenderTargetProxy()->numSamples() > 1,
-                         std::move(*appliedClip), dstProxyView, renderPassXferBarriers,
-                         colorLoadOp);
+                         writeView, usesMSAASurface, std::move(*appliedClip), dstProxyView,
+                         renderPassXferBarriers, colorLoadOp);
     SkASSERT(fProgram);
     rContext->priv().recordProgramInfo(fProgram);
 }