Move user stencil settings from GrPipeline to GrProgramInfo

Bug: skia:10419
Change-Id: If11d28f6d9348ba0011825f719123c09f0103603
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319481
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp b/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
index 4a876ec..23bc438 100644
--- a/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
+++ b/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
@@ -115,12 +115,10 @@
                                                 GrAppliedClip&& appliedClip,
                                                 const GrXferProcessor::DstProxyView& dstProxyView,
                                                 GrProcessorSet&& processorSet,
-                                                GrPipeline::InputFlags pipelineFlags,
-                                                const GrUserStencilSettings* stencilSettings) {
+                                                GrPipeline::InputFlags pipelineFlags) {
     GrPipeline::InitArgs pipelineArgs;
 
     pipelineArgs.fInputFlags = pipelineFlags;
-    pipelineArgs.fUserStencil = stencilSettings;
     pipelineArgs.fCaps = caps;
     pipelineArgs.fDstProxyView = dstProxyView;
     pipelineArgs.fWriteSwizzle = writeViewSwizzle;
@@ -133,16 +131,14 @@
 const GrPipeline* GrSimpleMeshDrawOpHelper::CreatePipeline(
                                                 GrOpFlushState* flushState,
                                                 GrProcessorSet&& processorSet,
-                                                GrPipeline::InputFlags pipelineFlags,
-                                                const GrUserStencilSettings* stencilSettings) {
+                                                GrPipeline::InputFlags pipelineFlags) {
     return CreatePipeline(&flushState->caps(),
                           flushState->allocator(),
                           flushState->writeView()->swizzle(),
                           flushState->detachAppliedClip(),
                           flushState->dstProxyView(),
                           std::move(processorSet),
-                          pipelineFlags,
-                          stencilSettings);
+                          pipelineFlags);
 }
 
 const GrPipeline* GrSimpleMeshDrawOpHelper::createPipeline(GrOpFlushState* flushState) {
@@ -155,6 +151,21 @@
                           this->pipelineFlags());
 }
 
+const GrPipeline* GrSimpleMeshDrawOpHelper::createPipeline(
+        const GrCaps* caps,
+        SkArenaAlloc* arena,
+        GrSwizzle writeViewSwizzle,
+        GrAppliedClip&& appliedClip,
+        const GrXferProcessor::DstProxyView& dstProxyView) {
+    return GrSimpleMeshDrawOpHelper::CreatePipeline(caps,
+                                                    arena,
+                                                    writeViewSwizzle,
+                                                    std::move(appliedClip),
+                                                    dstProxyView,
+                                                    this->detachProcessorSet(),
+                                                    this->pipelineFlags());
+}
+
 GrProgramInfo* GrSimpleMeshDrawOpHelper::CreateProgramInfo(
             const GrCaps* caps,
             SkArenaAlloc* arena,
@@ -173,11 +184,10 @@
                                    std::move(appliedClip),
                                    dstProxyView,
                                    std::move(processorSet),
-                                   pipelineFlags,
-                                   stencilSettings);
+                                   pipelineFlags);
 
     return CreateProgramInfo(arena, pipeline, writeView, geometryProcessor, primitiveType,
-                             renderPassXferBarriers);
+                             renderPassXferBarriers, stencilSettings);
 }
 
 GrProgramInfo* GrSimpleMeshDrawOpHelper::CreateProgramInfo(SkArenaAlloc* arena,
@@ -185,7 +195,8 @@
                                                            const GrSurfaceProxyView* writeView,
                                                            GrGeometryProcessor* geometryProcessor,
                                                            GrPrimitiveType primitiveType,
-                                                           GrXferBarrierFlags renderPassXferBarriers) {
+                                                           GrXferBarrierFlags xferBarrierFlags,
+                                                           const GrUserStencilSettings* stencilSettings) {
     GrRenderTargetProxy* outputProxy = writeView->asRenderTargetProxy();
 
     auto tmp = arena->make<GrProgramInfo>(outputProxy->numSamples(),
@@ -193,10 +204,11 @@
                                           outputProxy->backendFormat(),
                                           writeView->origin(),
                                           pipeline,
+                                          stencilSettings,
                                           geometryProcessor,
                                           primitiveType,
                                           0,
-                                          renderPassXferBarriers);
+                                          xferBarrierFlags);
     return tmp;
 }
 
@@ -230,6 +242,12 @@
         if (flags & GrPipeline::InputFlags::kHWAntialias) {
             result->append("HW Antialiasing enabled.\n");
         }
+        if (flags & GrPipeline::InputFlags::kWireframe) {
+            result->append("Wireframe enabled.\n");
+        }
+        if (flags & GrPipeline::InputFlags::kConservativeRaster) {
+            result->append("Conservative raster enabled.\n");
+        }
         return;
     }
     result->append("No pipeline flags\n");