Checkpoint towards core profile support.

1) Stop calling glDisable for removed state

2) Use new GLSL names for texture sampling functions.
Review URL: https://codereview.chromium.org/12330181

git-svn-id: http://skia.googlecode.com/svn/trunk@7908 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp
index aa3505c..c4339b8 100644
--- a/src/gpu/gl/GrGLShaderBuilder.cpp
+++ b/src/gpu/gl/GrGLShaderBuilder.cpp
@@ -24,12 +24,12 @@
 
 namespace {
 
-inline const char* sample_function_name(GrSLType type) {
+inline const char* sample_function_name(GrSLType type, GrGLSLGeneration glslGen) {
     if (kVec2f_GrSLType == type) {
-        return "texture2D";
+        return glslGen >= k130_GrGLSLGeneration ? "texture" : "texture2D";
     } else {
         GrAssert(kVec3f_GrSLType == type);
-        return "texture2DProj";
+        return glslGen >= k130_GrGLSLGeneration ? "textureProj" : "texture2DProj";
     }
 }
 
@@ -109,7 +109,7 @@
     GrAssert(NULL != coordName);
 
     out->appendf("%s(%s, %s)",
-                 sample_function_name(varyingType),
+                 sample_function_name(varyingType, fCtxInfo.glslGeneration()),
                  this->getUniformCStr(sampler.fSamplerUniform),
                  coordName);
     append_swizzle(out, *sampler.textureAccess(), fCtxInfo.caps());