Make GrBufferAccess a nested class of GrProcessor

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4978

Change-Id: I08c24e9183108f4dd6068216488fd3ac9b5f3ec2
Reviewed-on: https://skia-review.googlesource.com/4978
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
index 89fc741..1e100e4 100644
--- a/src/gpu/GrProcessor.cpp
+++ b/src/gpu/GrProcessor.cpp
@@ -120,7 +120,7 @@
     this->addGpuResource(access->programTexture());
 }
 
-void GrProcessor::addBufferAccess(const GrBufferAccess* access) {
+void GrProcessor::addBufferAccess(const BufferAccess* access) {
     fBufferAccesses.push_back(access);
     this->addGpuResource(access->getProgramBuffer());
 }
diff --git a/src/gpu/GrProgramDesc.cpp b/src/gpu/GrProgramDesc.cpp
index 0976af9..cdbbc23 100644
--- a/src/gpu/GrProgramDesc.cpp
+++ b/src/gpu/GrProgramDesc.cpp
@@ -50,7 +50,7 @@
                              textureSampler.visibility(), caps);
     }
     for (; i < numSamplers; ++i) {
-        const GrBufferAccess& access = proc.bufferAccess(i - numTextureSamplers);
+        const GrProcessor::BufferAccess& access = proc.bufferAccess(i - numTextureSamplers);
         k16[i] = sampler_key(kBufferSampler_GrSLType, access.texelConfig(),
                              access.visibility(), caps);
     }
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 50cbdc1..27361e7 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -158,7 +158,7 @@
                           allowSRGBInputs, static_cast<GrGLTexture*>(sampler.texture()));
     }
     for (int i = 0; i < processor.numBuffers(); ++i) {
-        const GrBufferAccess& access = processor.bufferAccess(i);
+        const GrProcessor::BufferAccess& access = processor.bufferAccess(i);
         fGpu->bindTexelBuffer((*nextSamplerIdx)++, access.texelConfig(),
                               static_cast<GrGLBuffer*>(access.buffer()));
     }
diff --git a/src/gpu/glsl/GrGLSLFragmentProcessor.h b/src/gpu/glsl/GrGLSLFragmentProcessor.h
index 7add1eb..2189250 100644
--- a/src/gpu/glsl/GrGLSLFragmentProcessor.h
+++ b/src/gpu/glsl/GrGLSLFragmentProcessor.h
@@ -97,9 +97,9 @@
         @param texSamplers       Contains one entry for each TextureSampler  of the GrProcessor.
                                  These can be passed to the builder to emit texture reads in the
                                  generated code.
-        @param bufferSamplers    Contains one entry for each GrBufferAccess of the GrProcessor.
-                                 These can be passed to the builder to emit buffer reads in the
-                                 generated code.
+        @param bufferSamplers    Contains one entry for each BufferAccess of the GrProcessor. These
+                                 can be passed to the builder to emit buffer reads in the generated
+                                 code.
      */
     struct EmitArgs {
         EmitArgs(GrGLSLFPFragmentBuilder* fragBuilder,
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.cpp b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
index c4c3e68..1e78788 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
@@ -264,7 +264,7 @@
         GrShaderFlags texelBufferVisibility = kNone_GrShaderFlags;
 
         for (int b = 0; b < numBuffers; ++b) {
-            const GrBufferAccess& access = processor.bufferAccess(b);
+            const GrProcessor::BufferAccess& access = processor.bufferAccess(b);
             name.printf("BufferSampler_%d", outBufferSamplers->count());
             this->emitSampler(kBufferSampler_GrSLType, access.texelConfig(), name.c_str(),
                               access.visibility(), outBufferSamplers);
diff --git a/src/gpu/instanced/InstanceProcessor.h b/src/gpu/instanced/InstanceProcessor.h
index 0b3a16d..d54ffcd 100644
--- a/src/gpu/instanced/InstanceProcessor.h
+++ b/src/gpu/instanced/InstanceProcessor.h
@@ -9,7 +9,6 @@
 #define gr_instanced_InstanceProcessor_DEFINED
 
 #include "GrCaps.h"
-#include "GrBufferAccess.h"
 #include "GrGeometryProcessor.h"
 #include "instanced/InstancedRenderingTypes.h"
 
@@ -57,8 +56,8 @@
      */
     static GrCaps::InstancedSupport CheckSupport(const GrGLSLCaps&, const GrCaps&);
 
-    const BatchInfo   fBatchInfo;
-    GrBufferAccess    fParamsAccess;
+    const BatchInfo fBatchInfo;
+    BufferAccess    fParamsAccess;
 
     friend class GLInstancedRendering; // For CheckSupport.