Remove texel buffer support.

Change-Id: Ia6f21afe714208979a5bc384e436b28ea2b9a297
Reviewed-on: https://skia-review.googlesource.com/141051
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 2a876d0..52d53bd 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -31,7 +31,6 @@
         GrGLuint programID,
         const UniformInfoArray& uniforms,
         const UniformInfoArray& textureSamplers,
-        const UniformInfoArray& texelBuffers,
         const VaryingInfoArray& pathProcVaryings,
         std::unique_ptr<GrGLSLPrimitiveProcessor> geometryProcessor,
         std::unique_ptr<GrGLSLXferProcessor> xferProcessor,
@@ -55,12 +54,10 @@
         , fInstanceStride(instanceStride)
         , fGpu(gpu)
         , fProgramDataManager(gpu, programID, uniforms, pathProcVaryings)
-        , fNumTextureSamplers(textureSamplers.count())
-        , fNumTexelBuffers(texelBuffers.count()) {
+        , fNumTextureSamplers(textureSamplers.count()) {
     // Assign texture units to sampler uniforms one time up front.
     GL_CALL(UseProgram(fProgramID));
     fProgramDataManager.setSamplerUniforms(textureSamplers, 0);
-    fProgramDataManager.setSamplerUniforms(texelBuffers, fNumTextureSamplers);
 }
 
 GrGLProgram::~GrGLProgram() {
@@ -82,15 +79,14 @@
     // of GLProgram determine how to set coord transforms
 
     // We must bind to texture units in the same order in which we set the uniforms in
-    // GrGLProgramDataManager. That is first all texture samplers and then texel buffers.
-    // Within each group we will bind them in primProc, fragProcs, XP order.
+    // GrGLProgramDataManager. That is, we bind textures for processors in this order:
+    // primProc, fragProcs, XP.
     int nextTexSamplerIdx = 0;
-    int nextTexelBufferIdx = fNumTextureSamplers;
     fPrimitiveProcessor->setData(fProgramDataManager, primProc,
                                  GrFragmentProcessor::CoordTransformIter(pipeline));
-    this->bindTextures(primProc, &nextTexSamplerIdx, &nextTexelBufferIdx);
+    this->bindTextures(primProc, &nextTexSamplerIdx);
 
-    this->setFragmentData(primProc, pipeline, &nextTexSamplerIdx, &nextTexelBufferIdx);
+    this->setFragmentData(primProc, pipeline, &nextTexSamplerIdx);
 
     const GrXferProcessor& xp = pipeline.getXferProcessor();
     SkIPoint offset;
@@ -102,7 +98,6 @@
                           static_cast<GrGLTexture*>(dstTexture));
     }
     SkASSERT(nextTexSamplerIdx == fNumTextureSamplers);
-    SkASSERT(nextTexelBufferIdx == fNumTextureSamplers + fNumTexelBuffers);
 }
 
 void GrGLProgram::generateMipmaps(const GrPrimitiveProcessor& primProc,
@@ -117,15 +112,14 @@
 
 void GrGLProgram::setFragmentData(const GrPrimitiveProcessor& primProc,
                                   const GrPipeline& pipeline,
-                                  int* nextTexSamplerIdx,
-                                  int* nextTexelBufferIdx) {
+                                  int* nextTexSamplerIdx) {
     GrFragmentProcessor::Iter iter(pipeline);
     GrGLSLFragmentProcessor::Iter glslIter(fFragmentProcessors.get(), fFragmentProcessorCnt);
     const GrFragmentProcessor* fp = iter.next();
     GrGLSLFragmentProcessor* glslFP = glslIter.next();
     while (fp && glslFP) {
         glslFP->setData(fProgramDataManager, *fp);
-        this->bindTextures(*fp, nextTexSamplerIdx, nextTexelBufferIdx);
+        this->bindTextures(*fp, nextTexSamplerIdx);
         fp = iter.next();
         glslFP = glslIter.next();
     }
@@ -164,18 +158,12 @@
 }
 
 void GrGLProgram::bindTextures(const GrResourceIOProcessor& processor,
-                               int* nextTexSamplerIdx,
-                               int* nextTexelBufferIdx) {
+                               int* nextTexSamplerIdx) {
     for (int i = 0; i < processor.numTextureSamplers(); ++i) {
         const GrResourceIOProcessor::TextureSampler& sampler = processor.textureSampler(i);
         fGpu->bindTexture((*nextTexSamplerIdx)++, sampler.samplerState(),
                           static_cast<GrGLTexture*>(sampler.peekTexture()));
     }
-    for (int i = 0; i < processor.numBuffers(); ++i) {
-        const GrResourceIOProcessor::BufferAccess& access = processor.bufferAccess(i);
-        fGpu->bindTexelBuffer((*nextTexelBufferIdx)++, access.texelConfig(),
-                              static_cast<GrGLBuffer*>(access.buffer()));
-    }
 }
 
 void GrGLProgram::generateMipmaps(const GrResourceIOProcessor& processor) {