| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrShaderVar_DEFINED | 8 #ifndef GrShaderVar_DEFINED |
| 9 #define GrShaderVar_DEFINED | 9 #define GrShaderVar_DEFINED |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 enum Precision { | 37 enum Precision { |
| 38 kLow_Precision, | 38 kLow_Precision, |
| 39 kMedium_Precision, | 39 kMedium_Precision, |
| 40 kHigh_Precision, | 40 kHigh_Precision, |
| 41 | 41 |
| 42 // Default precision is medium. This is because on OpenGL ES 2 highp sup
port is not | 42 // Default precision is medium. This is because on OpenGL ES 2 highp sup
port is not |
| 43 // guaranteed. On (non-ES) OpenGL the specifiers have no effect on preci
sion. | 43 // guaranteed. On (non-ES) OpenGL the specifiers have no effect on preci
sion. |
| 44 kDefault_Precision = kMedium_Precision, | 44 kDefault_Precision = kMedium_Precision, |
| 45 |
| 46 kLast_Precision = kHigh_Precision |
| 45 }; | 47 }; |
| 48 static const int kPrecisionCount = kLast_Precision + 1; |
| 46 | 49 |
| 47 /** | 50 /** |
| 48 * Defaults to a float with no precision specifier | 51 * Defaults to a float with no precision specifier |
| 49 */ | 52 */ |
| 50 GrShaderVar() | 53 GrShaderVar() |
| 51 : fType(kFloat_GrSLType) | 54 : fType(kFloat_GrSLType) |
| 52 , fTypeModifier(kNone_TypeModifier) | 55 , fTypeModifier(kNone_TypeModifier) |
| 53 , fCount(kNonArray) | 56 , fCount(kNonArray) |
| 54 , fPrecision(kDefault_Precision) { | 57 , fPrecision(kDefault_Precision) { |
| 55 } | 58 } |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 226 |
| 224 protected: | 227 protected: |
| 225 GrSLType fType; | 228 GrSLType fType; |
| 226 TypeModifier fTypeModifier; | 229 TypeModifier fTypeModifier; |
| 227 SkString fName; | 230 SkString fName; |
| 228 int fCount; | 231 int fCount; |
| 229 Precision fPrecision; | 232 Precision fPrecision; |
| 230 }; | 233 }; |
| 231 | 234 |
| 232 #endif | 235 #endif |
| OLD | NEW |