Remove GrGLSLSampler type and subclasses

GrGLSLUniformManager and GrGLSLProgramDataManager subclasses handle sampler variation across GPU backends.

BUG=skia:

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

Change-Id: I968b006bab978c2fa209d1f7eda710c298d1212f
Reviewed-on: https://skia-review.googlesource.com/5002
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 27361e7..1f2e1c8 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -31,7 +31,7 @@
                          const BuiltinUniformHandles& builtinUniforms,
                          GrGLuint programID,
                          const UniformInfoArray& uniforms,
-                         const SkTArray<GrGLSampler>& samplers,
+                         const UniformInfoArray& samplers,
                          const VaryingInfoArray& pathProcVaryings,
                          GrGLSLPrimitiveProcessor* geometryProcessor,
                          GrGLSLXferProcessor* xferProcessor,
diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
index 157f404..3b0940e 100644
--- a/src/gpu/gl/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -111,8 +111,8 @@
                 const GrProgramDesc&,
                 const BuiltinUniformHandles&,
                 GrGLuint programID,
-                const UniformInfoArray&,
-                const SkTArray<GrGLSampler>&,
+                const UniformInfoArray& uniforms,
+                const UniformInfoArray& samplers,
                 const VaryingInfoArray&, // used for NVPR only currently
                 GrGLSLPrimitiveProcessor* geometryProcessor,
                 GrGLSLXferProcessor* xferProcessor,
diff --git a/src/gpu/gl/GrGLProgramDataManager.cpp b/src/gpu/gl/GrGLProgramDataManager.cpp
index 9fe7d3b..68d0166 100644
--- a/src/gpu/gl/GrGLProgramDataManager.cpp
+++ b/src/gpu/gl/GrGLProgramDataManager.cpp
@@ -30,18 +30,7 @@
             uniform.fArrayCount = builderUniform.fVariable.getArrayCount();
             uniform.fType = builderUniform.fVariable.getType();
         );
-        // TODO: Move the Xoom uniform array in both FS and VS bug workaround here.
-
-        if (kVertex_GrShaderFlag & builderUniform.fVisibility) {
-            uniform.fVSLocation = builderUniform.fLocation;
-        } else {
-            uniform.fVSLocation = kUnusedUniform;
-        }
-        if (kFragment_GrShaderFlag & builderUniform.fVisibility) {
-            uniform.fFSLocation = builderUniform.fLocation;
-        } else {
-            uniform.fFSLocation = kUnusedUniform;
-        }
+        uniform.fLocation = builderUniform.fLocation;
     }
 
     // NVPR programs have separable varyings
@@ -61,30 +50,17 @@
     }
 }
 
-void GrGLProgramDataManager::setSamplers(const SkTArray<GrGLSampler>& samplers) const {
+void GrGLProgramDataManager::setSamplers(const UniformInfoArray& samplers) const {
     for (int i = 0; i < samplers.count(); ++i) {
-        GrGLint vsLocation;
-        GrGLint fsLocation;
-        const GrGLSampler& sampler = samplers[i];
-        if (kVertex_GrShaderFlag & sampler.visibility()) {
-            vsLocation = sampler.location();
+        const UniformInfo& sampler = samplers[i];
+        SkASSERT(sampler.fVisibility);
+        if (kUnusedUniform != sampler.fLocation) {
+            GR_GL_CALL(fGpu->glInterface(), Uniform1i(sampler.fLocation, i));
         } else {
-            vsLocation = kUnusedUniform;
-        }
-        if (kFragment_GrShaderFlag & sampler.visibility()) {
-            fsLocation = sampler.location();
-        } else {
-            fsLocation = kUnusedUniform;
-        }
-        // FIXME: We still insert a single sampler uniform for every stage. If the shader does not
-        // reference the sampler then the compiler may have optimized it out. Uncomment this assert
-        // once stages insert their own samplers.
-        // this->printUnused(uni);
-        if (kUnusedUniform != fsLocation) {
-            GR_GL_CALL(fGpu->glInterface(), Uniform1i(fsLocation, i));
-        }
-        if (kUnusedUniform != vsLocation && vsLocation != fsLocation) {
-            GR_GL_CALL(fGpu->glInterface(), Uniform1i(vsLocation, i));
+            // FIXME: We still insert a single sampler uniform for every stage. If the shader does
+            // not reference the sampler then the compiler may have optimized it out. Uncomment this
+            // assert once stages insert their own samplers.
+            // this->printUnused(uni);
         }
     }
 }
@@ -94,11 +70,8 @@
     SkASSERT(uni.fType == kInt_GrSLType);
     SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount);
     SkDEBUGCODE(this->printUnused(uni));
-    if (kUnusedUniform != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform1i(uni.fFSLocation, i));
-    }
-    if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform1i(uni.fVSLocation, i));
+    if (kUnusedUniform != uni.fLocation) {
+        GR_GL_CALL(fGpu->glInterface(), Uniform1i(uni.fLocation, i));
     }
 }
 
@@ -109,11 +82,8 @@
     SkASSERT(uni.fType == kInt_GrSLType);
     SkASSERT(arrayCount > 0);
     ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, arrayCount);
-    if (kUnusedUniform != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform1iv(uni.fFSLocation, arrayCount, v));
-    }
-    if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform1iv(uni.fVSLocation, arrayCount, v));
+    if (kUnusedUniform != uni.fLocation) {
+        GR_GL_CALL(fGpu->glInterface(), Uniform1iv(uni.fLocation, arrayCount, v));
     }
 }
 
@@ -122,11 +92,8 @@
     SkASSERT(uni.fType == kFloat_GrSLType);
     SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount);
     SkDEBUGCODE(this->printUnused(uni);)
-    if (kUnusedUniform != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform1f(uni.fFSLocation, v0));
-    }
-    if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform1f(uni.fVSLocation, v0));
+    if (kUnusedUniform != uni.fLocation) {
+        GR_GL_CALL(fGpu->glInterface(), Uniform1f(uni.fLocation, v0));
     }
 }
 
@@ -141,11 +108,8 @@
     // Once the uniform manager is responsible for inserting the duplicate uniform
     // arrays in VS and FS driver bug workaround, this can be enabled.
     // this->printUni(uni);
-    if (kUnusedUniform != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform1fv(uni.fFSLocation, arrayCount, v));
-    }
-    if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform1fv(uni.fVSLocation, arrayCount, v));
+    if (kUnusedUniform != uni.fLocation) {
+        GR_GL_CALL(fGpu->glInterface(), Uniform1fv(uni.fLocation, arrayCount, v));
     }
 }
 
@@ -154,11 +118,8 @@
     SkASSERT(uni.fType == kVec2f_GrSLType);
     SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount);
     SkDEBUGCODE(this->printUnused(uni);)
-    if (kUnusedUniform != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform2f(uni.fFSLocation, v0, v1));
-    }
-    if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform2f(uni.fVSLocation, v0, v1));
+    if (kUnusedUniform != uni.fLocation) {
+        GR_GL_CALL(fGpu->glInterface(), Uniform2f(uni.fLocation, v0, v1));
     }
 }
 
@@ -170,11 +131,8 @@
     SkASSERT(arrayCount > 0);
     ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, arrayCount);
     SkDEBUGCODE(this->printUnused(uni);)
-    if (kUnusedUniform != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform2fv(uni.fFSLocation, arrayCount, v));
-    }
-    if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform2fv(uni.fVSLocation, arrayCount, v));
+    if (kUnusedUniform != uni.fLocation) {
+        GR_GL_CALL(fGpu->glInterface(), Uniform2fv(uni.fLocation, arrayCount, v));
     }
 }
 
@@ -183,11 +141,8 @@
     SkASSERT(uni.fType == kVec3f_GrSLType);
     SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount);
     SkDEBUGCODE(this->printUnused(uni);)
-    if (kUnusedUniform != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform3f(uni.fFSLocation, v0, v1, v2));
-    }
-    if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform3f(uni.fVSLocation, v0, v1, v2));
+    if (kUnusedUniform != uni.fLocation) {
+        GR_GL_CALL(fGpu->glInterface(), Uniform3f(uni.fLocation, v0, v1, v2));
     }
 }
 
@@ -199,11 +154,8 @@
     SkASSERT(arrayCount > 0);
     ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, arrayCount);
     SkDEBUGCODE(this->printUnused(uni);)
-    if (kUnusedUniform != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform3fv(uni.fFSLocation, arrayCount, v));
-    }
-    if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform3fv(uni.fVSLocation, arrayCount, v));
+    if (kUnusedUniform != uni.fLocation) {
+        GR_GL_CALL(fGpu->glInterface(), Uniform3fv(uni.fLocation, arrayCount, v));
     }
 }
 
@@ -216,11 +168,8 @@
     SkASSERT(uni.fType == kVec4f_GrSLType);
     SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount);
     SkDEBUGCODE(this->printUnused(uni);)
-    if (kUnusedUniform != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform4f(uni.fFSLocation, v0, v1, v2, v3));
-    }
-    if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform4f(uni.fVSLocation, v0, v1, v2, v3));
+    if (kUnusedUniform != uni.fLocation) {
+        GR_GL_CALL(fGpu->glInterface(), Uniform4f(uni.fLocation, v0, v1, v2, v3));
     }
 }
 
@@ -232,11 +181,8 @@
     SkASSERT(arrayCount > 0);
     ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, arrayCount);
     SkDEBUGCODE(this->printUnused(uni);)
-    if (kUnusedUniform != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform4fv(uni.fFSLocation, arrayCount, v));
-    }
-    if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) {
-        GR_GL_CALL(fGpu->glInterface(), Uniform4fv(uni.fVSLocation, arrayCount, v));
+    if (kUnusedUniform != uni.fLocation) {
+        GR_GL_CALL(fGpu->glInterface(), Uniform4fv(uni.fLocation, arrayCount, v));
     }
 }
 
@@ -274,11 +220,8 @@
     SkASSERT(arrayCount > 0);
     ASSERT_ARRAY_UPLOAD_IN_BOUNDS(uni, arrayCount);
     SkDEBUGCODE(this->printUnused(uni);)
-    if (kUnusedUniform != uni.fFSLocation) {
-        set_uniform_matrix<N>::set(fGpu->glInterface(), uni.fFSLocation, arrayCount, matrices);
-    }
-    if (kUnusedUniform != uni.fVSLocation && uni.fVSLocation != uni.fFSLocation) {
-        set_uniform_matrix<N>::set(fGpu->glInterface(), uni.fVSLocation, arrayCount, matrices);
+    if (kUnusedUniform != uni.fLocation) {
+        set_uniform_matrix<N>::set(fGpu->glInterface(), uni.fLocation, arrayCount, matrices);
     }
 }
 
@@ -318,7 +261,7 @@
 
 #ifdef SK_DEBUG
 void GrGLProgramDataManager::printUnused(const Uniform& uni) const {
-    if (kUnusedUniform == uni.fFSLocation && kUnusedUniform == uni.fVSLocation) {
+    if (kUnusedUniform == uni.fLocation) {
         GrCapsDebugf(fGpu->caps(), "Unused uniform in shader\n");
     }
 }
diff --git a/src/gpu/gl/GrGLProgramDataManager.h b/src/gpu/gl/GrGLProgramDataManager.h
index 30c4a63..fa1456d 100644
--- a/src/gpu/gl/GrGLProgramDataManager.h
+++ b/src/gpu/gl/GrGLProgramDataManager.h
@@ -11,7 +11,6 @@
 #include "glsl/GrGLSLProgramDataManager.h"
 
 #include "GrAllocator.h"
-#include "gl/GrGLSampler.h"
 #include "gl/GrGLTypes.h"
 #include "glsl/GrGLSLShaderVar.h"
 
@@ -38,6 +37,7 @@
         GrGLint         fLocation;
     };
 
+
     // This uses an allocator rather than array so that the GrGLSLShaderVars don't move in memory
     // after they are inserted. Users of GrGLShaderBuilder get refs to the vars and ptrs to their
     // name strings. Otherwise, we'd have to hand out copies.
@@ -48,7 +48,7 @@
                            const VaryingInfoArray&);
 
 
-    void setSamplers(const SkTArray<GrGLSampler>& samplers) const;
+    void setSamplers(const UniformInfoArray& samplers) const;
 
     /** Functions for uploading uniform values. The varities ending in v can be used to upload to an
     *  array of uniforms. arrayCount must be <= the array count of the uniform.
@@ -82,12 +82,11 @@
     };
 
     struct Uniform {
-        GrGLint     fVSLocation;
-        GrGLint     fFSLocation;
-        SkDEBUGCODE(
-            GrSLType    fType;
-            int         fArrayCount;
-        );
+        GrGLint     fLocation;
+#ifdef SK_DEBUG
+        GrSLType    fType;
+        int         fArrayCount;
+#endif
     };
 
     enum {
diff --git a/src/gpu/gl/GrGLSampler.h b/src/gpu/gl/GrGLSampler.h
deleted file mode 100644
index 1f67ac9..0000000
--- a/src/gpu/gl/GrGLSampler.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-* Copyright 2016 Google Inc.
-*
-* Use of this source code is governed by a BSD-style license that can be
-* found in the LICENSE file.
-*/
-
-#ifndef GrGLSampler_DEFINED
-#define GrGLSampler_DEFINED
-
-#include "glsl/GrGLSLSampler.h"
-
-#include "gl/GrGLTypes.h"
-#include "glsl/GrGLSLShaderVar.h"
-
-class GrGLSampler : public GrGLSLSampler {
-public:
-    GrGLSampler(uint32_t visibility,
-                GrPixelConfig config,
-                GrSLType type,
-                GrSLPrecision precision,
-                const char* name) : INHERITED(visibility, config) {
-        SkASSERT(GrSLTypeIsCombinedSamplerType(type));
-        fShaderVar.setType(type);
-        fShaderVar.setTypeModifier(GrGLSLShaderVar::kUniform_TypeModifier);
-        fShaderVar.setPrecision(precision);
-        fShaderVar.accessName()->set(name);
-    }
-
-    GrGLint location() const { return fLocation; }
-    GrSLType type() const override { return fShaderVar.getType(); }
-
-    const char* onGetSamplerNameForTexture2D() const override { return fShaderVar.c_str(); }
-    const char* getSamplerNameForTexelFetch() const override { return fShaderVar.c_str(); }
-
-private:
-    GrGLSLShaderVar fShaderVar;
-    GrGLint         fLocation;
-
-    friend class GrGLUniformHandler;
-
-    typedef GrGLSLSampler INHERITED;
-};
-
-#endif
diff --git a/src/gpu/gl/GrGLUniformHandler.cpp b/src/gpu/gl/GrGLUniformHandler.cpp
index c388e46..37f2418 100644
--- a/src/gpu/gl/GrGLUniformHandler.cpp
+++ b/src/gpu/gl/GrGLUniformHandler.cpp
@@ -45,6 +45,7 @@
     uni.fVariable.setArrayCount(arrayCount);
     uni.fVisibility = visibility;
     uni.fVariable.setPrecision(precision);
+    uni.fLocation = -1;
 
     if (outName) {
         *outName = uni.fVariable.c_str();
@@ -52,19 +53,30 @@
     return GrGLSLUniformHandler::UniformHandle(fUniforms.count() - 1);
 }
 
-GrGLSLUniformHandler::SamplerHandle GrGLUniformHandler::internalAddSampler(uint32_t visibility,
-                                                                           GrPixelConfig config,
-                                                                           GrSLType type,
-                                                                           GrSLPrecision precision,
-                                                                           const char* name) {
+GrGLSLUniformHandler::SamplerHandle GrGLUniformHandler::addSampler(uint32_t visibility,
+                                                                   GrSwizzle swizzle,
+                                                                   GrSLType type,
+                                                                   GrSLPrecision precision,
+                                                                   const char* name) {
     SkASSERT(name && strlen(name));
     SkDEBUGCODE(static const uint32_t kVisMask = kVertex_GrShaderFlag | kFragment_GrShaderFlag);
     SkASSERT(0 == (~kVisMask & visibility));
     SkASSERT(0 != visibility);
+
     SkString mangleName;
     char prefix = 'u';
     fProgramBuilder->nameVariable(&mangleName, prefix, name, true);
-    fSamplers.emplace_back(visibility, config, type, precision, mangleName.c_str());
+
+    UniformInfo& sampler = fSamplers.push_back();
+    SkASSERT(GrSLTypeIsCombinedSamplerType(type));
+    sampler.fVariable.setType(type);
+    sampler.fVariable.setTypeModifier(GrGLSLShaderVar::kUniform_TypeModifier);
+    sampler.fVariable.setPrecision(precision);
+    sampler.fVariable.setName(mangleName);
+    sampler.fLocation = -1;
+    sampler.fVisibility = visibility;
+    fSamplerSwizzles.push_back(swizzle);
+    SkASSERT(fSamplers.count() == fSamplerSwizzles.count());
     return GrGLSLUniformHandler::SamplerHandle(fSamplers.count() - 1);
 }
 
@@ -76,8 +88,8 @@
         }
     }
     for (int i = 0; i < fSamplers.count(); ++i) {
-        if (fSamplers[i].visibility() & visibility) {
-            fSamplers[i].fShaderVar.appendDecl(fProgramBuilder->glslCaps(), out);
+        if (fSamplers[i].fVisibility & visibility) {
+            fSamplers[i].fVariable.appendDecl(fProgramBuilder->glslCaps(), out);
             out->append(";\n");
         }
     }
@@ -92,7 +104,7 @@
         }
         for (int i = 0; i < fSamplers.count(); ++i) {
             GrGLint location = i + uniformCnt;
-            GL_CALL(BindUniformLocation(programID, location, fSamplers[i].fShaderVar.c_str()));
+            GL_CALL(BindUniformLocation(programID, location, fSamplers[i].fVariable.c_str()));
             fSamplers[i].fLocation = location;
         }
     }
@@ -108,7 +120,7 @@
         }
         for (int i = 0; i < fSamplers.count(); ++i) {
             GrGLint location;
-            GL_CALL_RET(location, GetUniformLocation(programID, fSamplers[i].fShaderVar.c_str()));
+            GL_CALL_RET(location, GetUniformLocation(programID, fSamplers[i].fVariable.c_str()));
             fSamplers[i].fLocation = location;
         }
     }
diff --git a/src/gpu/gl/GrGLUniformHandler.h b/src/gpu/gl/GrGLUniformHandler.h
index 3656d3a..da5b96d 100644
--- a/src/gpu/gl/GrGLUniformHandler.h
+++ b/src/gpu/gl/GrGLUniformHandler.h
@@ -11,7 +11,6 @@
 #include "glsl/GrGLSLUniformHandler.h"
 
 #include "gl/GrGLProgramDataManager.h"
-#include "gl/GrGLSampler.h"
 
 class GrGLCaps;
 
@@ -29,7 +28,8 @@
 private:
     explicit GrGLUniformHandler(GrGLSLProgramBuilder* program)
         : INHERITED(program)
-        , fUniforms(kUniformsPerBlock) {}
+        , fUniforms(kUniformsPerBlock)
+        , fSamplers(kUniformsPerBlock) {}
 
     UniformHandle internalAddUniformArray(uint32_t visibility,
                                           GrSLType type,
@@ -39,15 +39,15 @@
                                           int arrayCount,
                                           const char** outName) override;
 
-    SamplerHandle internalAddSampler(uint32_t visibility,
-                                     GrPixelConfig config,
-                                     GrSLType type,
-                                     GrSLPrecision precision,
-                                     const char* name) override;
+    SamplerHandle addSampler(uint32_t visibility, GrSwizzle, GrSLType, GrSLPrecision,
+                             const char* name) override;
 
-    int numSamplers() const override { return fSamplers.count(); }
-    const GrGLSLSampler& getSampler(SamplerHandle handle) const override {
-        return fSamplers[handle.toIndex()];
+    const GrGLSLShaderVar& samplerVariable(SamplerHandle handle) const override {
+        return fSamplers[handle.toIndex()].fVariable;
+    }
+
+    GrSwizzle samplerSwizzle(SamplerHandle handle) const override {
+        return fSamplerSwizzles[handle.toIndex()];
     }
 
     void appendUniformDecls(GrShaderFlags visibility, SkString*) const override;
@@ -63,9 +63,9 @@
     typedef GrGLProgramDataManager::UniformInfo UniformInfo;
     typedef GrGLProgramDataManager::UniformInfoArray UniformInfoArray;
 
-    UniformInfoArray fUniforms;
-
-    SkTArray<GrGLSampler> fSamplers;
+    UniformInfoArray    fUniforms;
+    UniformInfoArray    fSamplers;
+    SkTArray<GrSwizzle> fSamplerSwizzles;
 
     friend class GrGLProgramBuilder;
 
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index 370cee6..e951c6b 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -22,7 +22,6 @@
 #include "glsl/GrGLSLFragmentProcessor.h"
 #include "glsl/GrGLSLGeometryProcessor.h"
 #include "glsl/GrGLSLProgramDataManager.h"
-#include "glsl/GrGLSLSampler.h"
 #include "glsl/GrGLSLXferProcessor.h"
 
 #define GL_CALL(X) GR_GL_CALL(this->gpu()->glInterface(), X)