| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 case kVec3f_GrSLType: | 78 case kVec3f_GrSLType: |
| 79 return "vec3"; | 79 return "vec3"; |
| 80 case kVec4f_GrSLType: | 80 case kVec4f_GrSLType: |
| 81 return "vec4"; | 81 return "vec4"; |
| 82 case kMat33f_GrSLType: | 82 case kMat33f_GrSLType: |
| 83 return "mat3"; | 83 return "mat3"; |
| 84 case kMat44f_GrSLType: | 84 case kMat44f_GrSLType: |
| 85 return "mat4"; | 85 return "mat4"; |
| 86 case kSampler2D_GrSLType: | 86 case kSampler2D_GrSLType: |
| 87 return "sampler2D"; | 87 return "sampler2D"; |
| 88 case kSamplerExternal_GrSLType: | |
| 89 return "samplerExternalOES"; | |
| 90 default: | 88 default: |
| 91 SkFAIL("Unknown shader var type."); | 89 SkFAIL("Unknown shader var type."); |
| 92 return ""; // suppress warning | 90 return ""; // suppress warning |
| 93 } | 91 } |
| 94 } | 92 } |
| 95 | 93 |
| 96 /** A generic base-class representing a GLSL expression. | 94 /** A generic base-class representing a GLSL expression. |
| 97 * The instance can be a variable name, expression or vecN(0) or vecN(1). Does s
imple constant | 95 * The instance can be a variable name, expression or vecN(0) or vecN(1). Does s
imple constant |
| 98 * folding with help of 1 and 0. | 96 * folding with help of 1 and 0. |
| 99 * | 97 * |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 | 326 |
| 329 /** | 327 /** |
| 330 * Does an inplace mul, *=, of vec4VarName by mulFactor. | 328 * Does an inplace mul, *=, of vec4VarName by mulFactor. |
| 331 * A semicolon is added after the assignment. | 329 * A semicolon is added after the assignment. |
| 332 */ | 330 */ |
| 333 void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSL
Expr4& mulFactor); | 331 void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSL
Expr4& mulFactor); |
| 334 | 332 |
| 335 #include "GrGLSL_impl.h" | 333 #include "GrGLSL_impl.h" |
| 336 | 334 |
| 337 #endif | 335 #endif |
| OLD | NEW |