Only use GrRenderTarget for sample locations in GrGLSLProgramBuilder

The idea here is to separate information we can have at opList time:
   numSamples, origin, primProc, primProcProxies and pipeline
and what we can only have at flush time:
   sample locations

The opList-available parameters will then be moved into a descriptor (GrProgramInfo).

Change-Id: Iae044a98a0cfc8685569c923d154a6f9dabfeb75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245621
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index c521c31..507d210 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -45,7 +45,9 @@
     cleanup_shaders(gpu, shaderIDs);
 }
 
-GrGLProgram* GrGLProgramBuilder::CreateProgram(GrRenderTarget* renderTarget, GrSurfaceOrigin origin,
+GrGLProgram* GrGLProgramBuilder::CreateProgram(GrRenderTarget* renderTarget,
+                                               int numSamples,
+                                               GrSurfaceOrigin origin,
                                                const GrPrimitiveProcessor& primProc,
                                                const GrTextureProxy* const primProcProxies[],
                                                const GrPipeline& pipeline,
@@ -59,7 +61,7 @@
 
     // create a builder.  This will be handed off to effects so they can use it to add
     // uniforms, varyings, textures, etc
-    GrGLProgramBuilder builder(gpu, renderTarget, origin,
+    GrGLProgramBuilder builder(gpu, renderTarget, numSamples, origin,
                                pipeline, primProc, primProcProxies, desc);
 
     auto persistentCache = gpu->getContext()->priv().getPersistentCache();
@@ -80,12 +82,13 @@
 
 GrGLProgramBuilder::GrGLProgramBuilder(GrGLGpu* gpu,
                                        GrRenderTarget* renderTarget,
+                                       int numSamples,
                                        GrSurfaceOrigin origin,
                                        const GrPipeline& pipeline,
                                        const GrPrimitiveProcessor& primProc,
                                        const GrTextureProxy* const primProcProxies[],
                                        GrProgramDesc* desc)
-        : INHERITED(renderTarget, origin, primProc, primProcProxies, pipeline, desc)
+        : INHERITED(renderTarget, numSamples, origin, primProc, primProcProxies, pipeline, desc)
         , fGpu(gpu)
         , fVaryingHandler(this)
         , fUniformHandler(this)