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 GrGLShaderBuilder_DEFINED | 8 #ifndef GrGLShaderBuilder_DEFINED |
9 #define GrGLShaderBuilder_DEFINED | 9 #define GrGLShaderBuilder_DEFINED |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 GrSLType coordType = kVec2f_GrSLType) const; | 50 GrSLType coordType = kVec2f_GrSLType) const; |
51 | 51 |
52 /** Version of above that appends the result to the fragment shader code ins
tead.*/ | 52 /** Version of above that appends the result to the fragment shader code ins
tead.*/ |
53 void appendTextureLookup(const TextureSampler&, | 53 void appendTextureLookup(const TextureSampler&, |
54 const char* coordName, | 54 const char* coordName, |
55 GrSLType coordType = kVec2f_GrSLType); | 55 GrSLType coordType = kVec2f_GrSLType); |
56 | 56 |
57 | 57 |
58 /** Does the work of appendTextureLookup and modulates the result by modulat
ion. The result is | 58 /** Does the work of appendTextureLookup and modulates the result by modulat
ion. The result is |
59 always a vec4. modulation and the swizzle specified by TextureSampler mu
st both be vec4 or | 59 always a vec4. modulation and the swizzle specified by TextureSampler mu
st both be vec4 or |
60 float. If modulation is "" or NULL it this function acts as though appen
dTextureLookup were | 60 float. If modulation is "" or nullptr it this function acts as though ap
pendTextureLookup were |
61 called. */ | 61 called. */ |
62 void appendTextureLookupAndModulate(const char* modulation, | 62 void appendTextureLookupAndModulate(const char* modulation, |
63 const TextureSampler&, | 63 const TextureSampler&, |
64 const char* coordName, | 64 const char* coordName, |
65 GrSLType coordType = kVec2f_GrSLType); | 65 GrSLType coordType = kVec2f_GrSLType); |
66 | 66 |
67 /** If texture swizzling is available using tex parameters then it is prefer
red over mangling | 67 /** If texture swizzling is available using tex parameters then it is prefer
red over mangling |
68 the generated shader code. This potentially allows greater reuse of cach
ed shaders. */ | 68 the generated shader code. This potentially allows greater reuse of cach
ed shaders. */ |
69 static const GrGLenum* GetTexParamSwizzle(GrPixelConfig config, const GrGLCa
ps& caps); | 69 static const GrGLenum* GetTexParamSwizzle(GrPixelConfig config, const GrGLCa
ps& caps); |
70 | 70 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 VarArray fOutputs; | 199 VarArray fOutputs; |
200 uint32_t fFeaturesAddedMask; | 200 uint32_t fFeaturesAddedMask; |
201 SkSTArray<1, SkString> fLayoutParams[kLastInterfaceQualifier + 1]; | 201 SkSTArray<1, SkString> fLayoutParams[kLastInterfaceQualifier + 1]; |
202 int fCodeIndex; | 202 int fCodeIndex; |
203 bool fFinalized; | 203 bool fFinalized; |
204 | 204 |
205 friend class GrGLProgramBuilder; | 205 friend class GrGLProgramBuilder; |
206 friend class GrGLPathProgramBuilder; // to access fInputs. | 206 friend class GrGLPathProgramBuilder; // to access fInputs. |
207 }; | 207 }; |
208 #endif | 208 #endif |
OLD | NEW |