Use GrGLContextInfo in shader generator

Review URL: http://codereview.appspot.com/5645083/



git-svn-id: http://skia.googlecode.com/svn/trunk@3170 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLShaderVar.h b/src/gpu/gl/GrGLShaderVar.h
index 95c54f3..dc7d52b 100644
--- a/src/gpu/gl/GrGLShaderVar.h
+++ b/src/gpu/gl/GrGLShaderVar.h
@@ -9,7 +9,7 @@
 #ifndef GrGLShaderVar_DEFINED
 #define GrGLShaderVar_DEFINED
 
-#include "GrGLInterface.h"
+#include "GrGLContextInfo.h"
 #include "GrGLSL.h"
 #include "../GrStringBuilder.h"
 
@@ -200,14 +200,14 @@
     /**
      * Write a declaration of this variable to out.
      */
-    void appendDecl(const GrGLInterface* gl, GrStringBuilder* out,
-                    GrGLSLGeneration gen) const {
+    void appendDecl(const GrGLContextInfo& gl, GrStringBuilder* out) const {
         if (this->getTypeModifier() != kNone_TypeModifier) {
-           out->append(TypeModifierString(this->getTypeModifier(), gen));
+           out->append(TypeModifierString(this->getTypeModifier(),
+                                          gl.glslGeneration()));
            out->append(" ");
         }
         if (this->emitsPrecision()) {
-            out->append(PrecisionString(gl));
+            out->append(GrGetGLSLVarPrecisionDeclType(gl.binding()));
             out->append(" ");
         }
         Type effectiveType = this->getType();
@@ -268,10 +268,6 @@
     }
 
 private:
-    static const char* PrecisionString(const GrGLInterface* gl) {
-        return gl->supportsDesktop() ? "" : "mediump";
-    }
-
     static const char* TypeModifierString(TypeModifier t,
                                           GrGLSLGeneration gen) {
         switch (t) {