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"; | |
107 default: | 103 default: |
108 SkFAIL("Unknown shader var type."); | 104 SkFAIL("Unknown shader var type."); |
109 return ""; // suppress warning | 105 return ""; // suppress warning |
110 } | 106 } |
111 } | 107 } |
112 | 108 |
113 /** A generic base-class representing a GLSL expression. | 109 /** 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 | 110 * 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. | 111 * folding with help of 1 and 0. |
116 * | 112 * |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 | 341 |
346 /** | 342 /** |
347 * Does an inplace mul, *=, of vec4VarName by mulFactor. | 343 * Does an inplace mul, *=, of vec4VarName by mulFactor. |
348 * A semicolon is added after the assignment. | 344 * A semicolon is added after the assignment. |
349 */ | 345 */ |
350 void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSL
Expr4& mulFactor); | 346 void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSL
Expr4& mulFactor); |
351 | 347 |
352 #include "GrGLSL_impl.h" | 348 #include "GrGLSL_impl.h" |
353 | 349 |
354 #endif | 350 #endif |
OLD | NEW |