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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 case kSampler2DRect_GrSLType: | 128 case kSampler2DRect_GrSLType: |
129 return "sampler2DRect"; | 129 return "sampler2DRect"; |
130 case kSamplerBuffer_GrSLType: | 130 case kSamplerBuffer_GrSLType: |
131 return "samplerBuffer"; | 131 return "samplerBuffer"; |
132 case kBool_GrSLType: | 132 case kBool_GrSLType: |
133 return "bool"; | 133 return "bool"; |
134 case kInt_GrSLType: | 134 case kInt_GrSLType: |
135 return "int"; | 135 return "int"; |
136 case kUint_GrSLType: | 136 case kUint_GrSLType: |
137 return "uint"; | 137 return "uint"; |
| 138 case kTexture2D_GrSLType: |
| 139 return "texture2D"; |
| 140 case kSampler_GrSLType: |
| 141 return "sampler"; |
138 default: | 142 default: |
139 SkFAIL("Unknown shader var type."); | 143 SkFAIL("Unknown shader var type."); |
140 return ""; // suppress warning | 144 return ""; // suppress warning |
141 } | 145 } |
142 } | 146 } |
143 | 147 |
144 /** A generic base-class representing a GLSL expression. | 148 /** A generic base-class representing a GLSL expression. |
145 * The instance can be a variable name, expression or vecN(0) or vecN(1). Does s
imple constant | 149 * The instance can be a variable name, expression or vecN(0) or vecN(1). Does s
imple constant |
146 * folding with help of 1 and 0. | 150 * folding with help of 1 and 0. |
147 * | 151 * |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 | 380 |
377 /** | 381 /** |
378 * Does an inplace mul, *=, of vec4VarName by mulFactor. | 382 * Does an inplace mul, *=, of vec4VarName by mulFactor. |
379 * A semicolon is added after the assignment. | 383 * A semicolon is added after the assignment. |
380 */ | 384 */ |
381 void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSL
Expr4& mulFactor); | 385 void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSL
Expr4& mulFactor); |
382 | 386 |
383 #include "GrGLSL_impl.h" | 387 #include "GrGLSL_impl.h" |
384 | 388 |
385 #endif | 389 #endif |
OLD | NEW |