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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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: | 103 case kBool_GrSLType: |
104 return "bool"; | 104 return "bool"; |
105 case kInt_GrSLType: | 105 case kInt_GrSLType: |
106 return "int"; | 106 return "int"; |
| 107 case kUint_GrSLType: |
| 108 return "uint"; |
107 default: | 109 default: |
108 SkFAIL("Unknown shader var type."); | 110 SkFAIL("Unknown shader var type."); |
109 return ""; // suppress warning | 111 return ""; // suppress warning |
110 } | 112 } |
111 } | 113 } |
112 | 114 |
113 /** A generic base-class representing a GLSL expression. | 115 /** A generic base-class representing a GLSL expression. |
114 * The instance can be a variable name, expression or vecN(0) or vecN(1). Does s
imple constant | 116 * The instance can be a variable name, expression or vecN(0) or vecN(1). Does s
imple constant |
115 * folding with help of 1 and 0. | 117 * folding with help of 1 and 0. |
116 * | 118 * |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 | 347 |
346 /** | 348 /** |
347 * Does an inplace mul, *=, of vec4VarName by mulFactor. | 349 * Does an inplace mul, *=, of vec4VarName by mulFactor. |
348 * A semicolon is added after the assignment. | 350 * A semicolon is added after the assignment. |
349 */ | 351 */ |
350 void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSL
Expr4& mulFactor); | 352 void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSL
Expr4& mulFactor); |
351 | 353 |
352 #include "GrGLSL_impl.h" | 354 #include "GrGLSL_impl.h" |
353 | 355 |
354 #endif | 356 #endif |
OLD | NEW |