Change the argument ordering for GrOpsRenderPass::bindTextures

Places the primProc textures immediately after the primProc. This is
the more intuitive place for them and helps show that the pipeline is
there for FPs (not the primProc).

Change-Id: I87cb5715dc5652306713c4d8dced6200a2604b5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275313
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/gl/GrGLOpsRenderPass.cpp b/src/gpu/gl/GrGLOpsRenderPass.cpp
index 23f45a1..2315ad8 100644
--- a/src/gpu/gl/GrGLOpsRenderPass.cpp
+++ b/src/gpu/gl/GrGLOpsRenderPass.cpp
@@ -36,13 +36,13 @@
 }
 
 bool GrGLOpsRenderPass::onBindTextures(const GrPrimitiveProcessor& primProc,
-                                       const GrPipeline& pipeline,
-                                       const GrSurfaceProxy* const primProcTextures[]) {
+                                       const GrSurfaceProxy* const primProcTextures[],
+                                       const GrPipeline& pipeline) {
     GrGLProgram* program = fGpu->currentProgram();
     if (!program) {
         return false;
     }
-    program->bindTextures(primProc, pipeline, primProcTextures);
+    program->bindTextures(primProc, primProcTextures, pipeline);
     return true;
 }
 
diff --git a/src/gpu/gl/GrGLOpsRenderPass.h b/src/gpu/gl/GrGLOpsRenderPass.h
index a7eb31c..182982d 100644
--- a/src/gpu/gl/GrGLOpsRenderPass.h
+++ b/src/gpu/gl/GrGLOpsRenderPass.h
@@ -54,8 +54,8 @@
 
     bool onBindPipeline(const GrProgramInfo& programInfo, const SkRect& drawBounds) override;
     void onSetScissorRect(const SkIRect& scissor) override;
-    bool onBindTextures(const GrPrimitiveProcessor& primProc, const GrPipeline& pipeline,
-                        const GrSurfaceProxy* const primProcTextures[]) override;
+    bool onBindTextures(const GrPrimitiveProcessor&, const GrSurfaceProxy* const primProcTextures[],
+                        const GrPipeline& pipeline) override;
     void onBindBuffers(const GrBuffer* indexBuffer, const GrBuffer* instanceBuffer,
                        const GrBuffer* vertexBuffer, GrPrimitiveRestart) override;
     void onDraw(int vertexCount, int baseVertex) override;
diff --git a/src/gpu/gl/GrGLPathRendering.cpp b/src/gpu/gl/GrGLPathRendering.cpp
index 2d910a8..425a3c8 100644
--- a/src/gpu/gl/GrGLPathRendering.cpp
+++ b/src/gpu/gl/GrGLPathRendering.cpp
@@ -122,8 +122,8 @@
         this->gpu()->flushScissorRect(programInfo.fixedScissor(), renderTarget->width(),
                                       renderTarget->height(), programInfo.origin());
     }
-    this->gpu()->currentProgram()->bindTextures(
-            programInfo.primProc(), programInfo.pipeline(), nullptr);
+    this->gpu()->currentProgram()->bindTextures(programInfo.primProc(), nullptr,
+                                                programInfo.pipeline());
 
     const GrGLPath* glPath = static_cast<const GrGLPath*>(path);
 
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index fd2c4a3..fd11185 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -100,8 +100,9 @@
     fXferProcessor->setData(fProgramDataManager, xp, dstTexture, offset);
 }
 
-void GrGLProgram::bindTextures(const GrPrimitiveProcessor& primProc, const GrPipeline& pipeline,
-                               const GrSurfaceProxy* const primProcTextures[]) {
+void GrGLProgram::bindTextures(const GrPrimitiveProcessor& primProc,
+                               const GrSurfaceProxy* const primProcTextures[],
+                               const GrPipeline& pipeline) {
     for (int i = 0; i < primProc.numTextureSamplers(); ++i) {
         SkASSERT(primProcTextures[i]->asTextureProxy());
         auto* overrideTexture = static_cast<GrGLTexture*>(primProcTextures[i]->peekTexture());
diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
index 83ff0c6..f784f2b 100644
--- a/src/gpu/gl/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -122,8 +122,8 @@
     /**
      * Binds all primitive processor and fragment processor textures.
      */
-    void bindTextures(const GrPrimitiveProcessor&, const GrPipeline&,
-                      const GrSurfaceProxy* const primProcTextures[]);
+    void bindTextures(const GrPrimitiveProcessor&, const GrSurfaceProxy* const primProcTextures[],
+                      const GrPipeline&);
 
     int vertexStride() const { return fVertexStride; }
     int instanceStride() const { return fInstanceStride; }