| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef GrGLShaderVar_DEFINED | 8 #ifndef GrGLShaderVar_DEFINED |
| 9 #define GrGLShaderVar_DEFINED | 9 #define GrGLShaderVar_DEFINED |
| 10 | 10 |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 static const char* PrecisionString(Precision p, GrGLStandard standard) { | 200 static const char* PrecisionString(Precision p, GrGLStandard standard) { |
| 201 // Desktop GLSL has added precision qualifiers but they don't do anythin
g. | 201 // Desktop GLSL has added precision qualifiers but they don't do anythin
g. |
| 202 if (kGLES_GrGLStandard == standard) { | 202 if (kGLES_GrGLStandard == standard) { |
| 203 switch (p) { | 203 switch (p) { |
| 204 case kLow_Precision: | 204 case kLow_Precision: |
| 205 return "lowp "; | 205 return "lowp "; |
| 206 case kMedium_Precision: | 206 case kMedium_Precision: |
| 207 return "mediump "; | 207 return "mediump "; |
| 208 case kHigh_Precision: | 208 case kHigh_Precision: |
| 209 return "highp "; | 209 return "highp "; |
| 210 case kDefault_Precision: | |
| 211 return ""; | |
| 212 default: | 210 default: |
| 213 SkFAIL("Unexpected precision type."); | 211 SkFAIL("Unexpected precision type."); |
| 214 } | 212 } |
| 215 } | 213 } |
| 216 return ""; | 214 return ""; |
| 217 } | 215 } |
| 218 | 216 |
| 219 private: | 217 private: |
| 220 static const char* TypeModifierString(TypeModifier t, GrGLSLGeneration gen)
{ | 218 static const char* TypeModifierString(TypeModifier t, GrGLSLGeneration gen)
{ |
| 221 switch (t) { | 219 switch (t) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 243 | 241 |
| 244 Origin fOrigin; | 242 Origin fOrigin; |
| 245 /// Work around driver bugs on some hardware that don't correctly | 243 /// Work around driver bugs on some hardware that don't correctly |
| 246 /// support uniform float [] | 244 /// support uniform float [] |
| 247 bool fUseUniformFloatArrays; | 245 bool fUseUniformFloatArrays; |
| 248 | 246 |
| 249 typedef GrShaderVar INHERITED; | 247 typedef GrShaderVar INHERITED; |
| 250 }; | 248 }; |
| 251 | 249 |
| 252 #endif | 250 #endif |
| OLD | NEW |