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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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: | 88 case kSamplerExternal_GrSLType: |
89 return "samplerExternalOES"; | 89 return "samplerExternalOES"; |
| 90 case kBool_GrSLType: |
| 91 return "bool"; |
| 92 case kInt_GrSLType: |
| 93 return "int"; |
90 default: | 94 default: |
91 SkFAIL("Unknown shader var type."); | 95 SkFAIL("Unknown shader var type."); |
92 return ""; // suppress warning | 96 return ""; // suppress warning |
93 } | 97 } |
94 } | 98 } |
95 | 99 |
96 /** A generic base-class representing a GLSL expression. | 100 /** 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 | 101 * 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. | 102 * folding with help of 1 and 0. |
99 * | 103 * |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 | 332 |
329 /** | 333 /** |
330 * Does an inplace mul, *=, of vec4VarName by mulFactor. | 334 * Does an inplace mul, *=, of vec4VarName by mulFactor. |
331 * A semicolon is added after the assignment. | 335 * A semicolon is added after the assignment. |
332 */ | 336 */ |
333 void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSL
Expr4& mulFactor); | 337 void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSL
Expr4& mulFactor); |
334 | 338 |
335 #include "GrGLSL_impl.h" | 339 #include "GrGLSL_impl.h" |
336 | 340 |
337 #endif | 341 #endif |
OLD | NEW |