Make GrGLShaderVar objects aware of whether they are uniform, varying, or
attribute varibles. Extract GLSL generation enum and utility function into
new GrGLSL header.



git-svn-id: http://skia.googlecode.com/svn/trunk@2827 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrGLProgram.h b/src/gpu/GrGLProgram.h
index 12f175f..450da05 100644
--- a/src/gpu/GrGLProgram.h
+++ b/src/gpu/GrGLProgram.h
@@ -12,6 +12,7 @@
 
 #include "GrDrawState.h"
 #include "GrGLInterface.h"
+#include "GrGLSL.h"
 #include "GrStringBuilder.h"
 #include "GrGpu.h"
 
@@ -36,22 +37,6 @@
  */
 class GrGLProgram {
 public:
-    // Limited set of GLSL versions we build shaders for. Caller should round
-    // down the GLSL version to one of these enums.
-    enum GLSLVersion {
-        /**
-         * Desktop GLSL 1.10 and ES2 shading lang (based on desktop GLSL 1.20)
-         */
-        k110_GLSLVersion,
-        /**
-         * Desktop GLSL 1.30
-         */
-        k130_GLSLVersion,
-        /**
-         * Dekstop GLSL 1.50
-         */
-        k150_GLSLVersion,
-    };
 
     class CachedData;
 
@@ -64,7 +49,7 @@
      *  but in a separate cacheable container.
      */
     bool genProgram(const GrGLInterface* gl,
-                    GLSLVersion glslVersion,
+                    GrGLSLGeneration glslVersion,
                     CachedData* programData) const;
 
      /**
@@ -353,7 +338,7 @@
                       StageUniLocations* locations) const;
 
     void genGeometryShader(const GrGLInterface* gl,
-                           GLSLVersion glslVersion,
+                           GrGLSLGeneration glslVersion,
                            ShaderCodeSegments* segments) const;
 
     // generates code to compute coverage based on edge AA.
@@ -364,7 +349,7 @@
                          ShaderCodeSegments* segments) const;
 
     static bool CompileShaders(const GrGLInterface* gl,
-                               GLSLVersion glslVersion,
+                               GrGLSLGeneration glslVersion,
                                const ShaderCodeSegments& segments, 
                                CachedData* programData);