| 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 GrGLSL_DEFINED | 8 #ifndef GrGLSL_DEFINED |
| 9 #define GrGLSL_DEFINED | 9 #define GrGLSL_DEFINED |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 case kVec3f_GrSLType: | 62 case kVec3f_GrSLType: |
| 63 return "vec3"; | 63 return "vec3"; |
| 64 case kVec4f_GrSLType: | 64 case kVec4f_GrSLType: |
| 65 return "vec4"; | 65 return "vec4"; |
| 66 case kMat33f_GrSLType: | 66 case kMat33f_GrSLType: |
| 67 return "mat3"; | 67 return "mat3"; |
| 68 case kMat44f_GrSLType: | 68 case kMat44f_GrSLType: |
| 69 return "mat4"; | 69 return "mat4"; |
| 70 case kSampler2D_GrSLType: | 70 case kSampler2D_GrSLType: |
| 71 return "sampler2D"; | 71 return "sampler2D"; |
| 72 case kSampler3D_GrSLType: |
| 73 return "sampler3D"; |
| 72 default: | 74 default: |
| 73 SkFAIL("Unknown shader var type."); | 75 SkFAIL("Unknown shader var type."); |
| 74 return ""; // suppress warning | 76 return ""; // suppress warning |
| 75 } | 77 } |
| 76 } | 78 } |
| 77 | 79 |
| 78 /** A generic base-class representing a GLSL expression. | 80 /** A generic base-class representing a GLSL expression. |
| 79 * The instance can be a variable name, expression or vecN(0) or vecN(1). Does s
imple constant | 81 * The instance can be a variable name, expression or vecN(0) or vecN(1). Does s
imple constant |
| 80 * folding with help of 1 and 0. | 82 * folding with help of 1 and 0. |
| 81 * | 83 * |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 /** | 313 /** |
| 312 * Does an inplace mul, *=, of vec4VarName by mulFactor. | 314 * Does an inplace mul, *=, of vec4VarName by mulFactor. |
| 313 * A semicolon and newline are added after the assignment. | 315 * A semicolon and newline are added after the assignment. |
| 314 */ | 316 */ |
| 315 void GrGLSLMulVarBy4f(SkString* outAppend, unsigned tabCnt, | 317 void GrGLSLMulVarBy4f(SkString* outAppend, unsigned tabCnt, |
| 316 const char* vec4VarName, const GrGLSLExpr4& mulFactor); | 318 const char* vec4VarName, const GrGLSLExpr4& mulFactor); |
| 317 | 319 |
| 318 #include "GrGLSL_impl.h" | 320 #include "GrGLSL_impl.h" |
| 319 | 321 |
| 320 #endif | 322 #endif |
| OLD | NEW |