| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 case kMat33f_GrSLType: | 93 case kMat33f_GrSLType: |
| 94 return "mat3"; | 94 return "mat3"; |
| 95 case kMat44f_GrSLType: | 95 case kMat44f_GrSLType: |
| 96 return "mat4"; | 96 return "mat4"; |
| 97 case kSampler2D_GrSLType: | 97 case kSampler2D_GrSLType: |
| 98 return "sampler2D"; | 98 return "sampler2D"; |
| 99 case kSamplerExternal_GrSLType: | 99 case kSamplerExternal_GrSLType: |
| 100 return "samplerExternalOES"; | 100 return "samplerExternalOES"; |
| 101 case kSampler2DRect_GrSLType: | 101 case kSampler2DRect_GrSLType: |
| 102 return "sampler2DRect"; | 102 return "sampler2DRect"; |
| 103 case kBool_GrSLType: |
| 104 return "bool"; |
| 105 case kInt_GrSLType: |
| 106 return "int"; |
| 103 default: | 107 default: |
| 104 SkFAIL("Unknown shader var type."); | 108 SkFAIL("Unknown shader var type."); |
| 105 return ""; // suppress warning | 109 return ""; // suppress warning |
| 106 } | 110 } |
| 107 } | 111 } |
| 108 | 112 |
| 109 /** A generic base-class representing a GLSL expression. | 113 /** A generic base-class representing a GLSL expression. |
| 110 * The instance can be a variable name, expression or vecN(0) or vecN(1). Does s
imple constant | 114 * The instance can be a variable name, expression or vecN(0) or vecN(1). Does s
imple constant |
| 111 * folding with help of 1 and 0. | 115 * folding with help of 1 and 0. |
| 112 * | 116 * |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 | 345 |
| 342 /** | 346 /** |
| 343 * Does an inplace mul, *=, of vec4VarName by mulFactor. | 347 * Does an inplace mul, *=, of vec4VarName by mulFactor. |
| 344 * A semicolon is added after the assignment. | 348 * A semicolon is added after the assignment. |
| 345 */ | 349 */ |
| 346 void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSL
Expr4& mulFactor); | 350 void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSL
Expr4& mulFactor); |
| 347 | 351 |
| 348 #include "GrGLSL_impl.h" | 352 #include "GrGLSL_impl.h" |
| 349 | 353 |
| 350 #endif | 354 #endif |
| OLD | NEW |