OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrGLSLShaderBuilder_DEFINED | 8 #ifndef GrGLSLShaderBuilder_DEFINED |
9 #define GrGLSLShaderBuilder_DEFINED | 9 #define GrGLSLShaderBuilder_DEFINED |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 /** Does the work of appendTextureLookup and modulates the result by modulat
ion. The result is | 56 /** Does the work of appendTextureLookup and modulates the result by modulat
ion. The result is |
57 always a vec4. modulation and the swizzle specified by GrGLSLTextureSamp
ler must both be | 57 always a vec4. modulation and the swizzle specified by GrGLSLTextureSamp
ler must both be |
58 vec4 or float. If modulation is "" or nullptr it this function acts as t
hough | 58 vec4 or float. If modulation is "" or nullptr it this function acts as t
hough |
59 appendTextureLookup were called. */ | 59 appendTextureLookup were called. */ |
60 void appendTextureLookupAndModulate(const char* modulation, | 60 void appendTextureLookupAndModulate(const char* modulation, |
61 const GrGLSLTextureSampler&, | 61 const GrGLSLTextureSampler&, |
62 const char* coordName, | 62 const char* coordName, |
63 GrSLType coordType = kVec2f_GrSLType); | 63 GrSLType coordType = kVec2f_GrSLType); |
64 | 64 |
65 /** | 65 /** |
66 * Called by GrGLProcessors to add code to one of the shaders. | 66 * Called by GrGLSLProcessors to add code to one of the shaders. |
67 */ | 67 */ |
68 void codeAppendf(const char format[], ...) SK_PRINTF_LIKE(2, 3) { | 68 void codeAppendf(const char format[], ...) SK_PRINTF_LIKE(2, 3) { |
69 va_list args; | 69 va_list args; |
70 va_start(args, format); | 70 va_start(args, format); |
71 this->code().appendVAList(format, args); | 71 this->code().appendVAList(format, args); |
72 va_end(args); | 72 va_end(args); |
73 } | 73 } |
74 | 74 |
75 void codeAppend(const char* str) { this->code().append(str); } | 75 void codeAppend(const char* str) { this->code().append(str); } |
76 | 76 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 VarArray fOutputs; | 191 VarArray fOutputs; |
192 uint32_t fFeaturesAddedMask; | 192 uint32_t fFeaturesAddedMask; |
193 SkSTArray<1, SkString> fLayoutParams[kLastInterfaceQualifier + 1]; | 193 SkSTArray<1, SkString> fLayoutParams[kLastInterfaceQualifier + 1]; |
194 int fCodeIndex; | 194 int fCodeIndex; |
195 bool fFinalized; | 195 bool fFinalized; |
196 | 196 |
197 friend class GrGLProgramBuilder; | 197 friend class GrGLProgramBuilder; |
198 friend class GrGLPathProgramBuilder; // to access fInputs. | 198 friend class GrGLPathProgramBuilder; // to access fInputs. |
199 }; | 199 }; |
200 #endif | 200 #endif |
OLD | NEW |