| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 /** Version of above that appends the result to the fragment shader code ins
tead.*/ | 83 /** Version of above that appends the result to the fragment shader code ins
tead.*/ |
| 84 void fsAppendTextureLookup(const TextureSampler&, | 84 void fsAppendTextureLookup(const TextureSampler&, |
| 85 const char* coordName, | 85 const char* coordName, |
| 86 GrSLType coordType = kVec2f_GrSLType); | 86 GrSLType coordType = kVec2f_GrSLType); |
| 87 | 87 |
| 88 | 88 |
| 89 /** Does the work of appendTextureLookup and modulates the result by modulat
ion. The result is | 89 /** Does the work of appendTextureLookup and modulates the result by modulat
ion. The result is |
| 90 always a vec4. modulation and the swizzle specified by TextureSampler mu
st both be vec4 or | 90 always a vec4. modulation and the swizzle specified by TextureSampler mu
st both be vec4 or |
| 91 float. If modulation is "" or NULL it this function acts as though appen
dTextureLookup were | 91 float. If modulation is "" or NULL it this function acts as though appen
dTextureLookup were |
| 92 called. */ | 92 called. */ |
| 93 void fsAppendTextureLookupAndModulate(const char* modulation, | 93 void fsAppendTextureLookupAndModulate(const GrGLSLExpr4& modulation, |
| 94 const TextureSampler&, | 94 const TextureSampler&, |
| 95 const char* coordName, | 95 const char* coordName, |
| 96 GrSLType coordType = kVec2f_GrSLType); | 96 GrSLType coordType = kVec2f_GrSLType); |
| 97 | 97 |
| 98 /** Emits a helper function outside of main() in the fragment shader. */ | 98 /** Emits a helper function outside of main() in the fragment shader. */ |
| 99 void fsEmitFunction(GrSLType returnType, | 99 void fsEmitFunction(GrSLType returnType, |
| 100 const char* name, | 100 const char* name, |
| 101 int argCnt, | 101 int argCnt, |
| 102 const GrGLShaderVar* args, | 102 const GrGLShaderVar* args, |
| 103 const char* body, | 103 const char* body, |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 int effectCnt, | 447 int effectCnt, |
| 448 GrGLSLExpr4* inOutFSColor) SK_OVERRIDE; | 448 GrGLSLExpr4* inOutFSColor) SK_OVERRIDE; |
| 449 | 449 |
| 450 private: | 450 private: |
| 451 int fNumTexCoordSets; | 451 int fNumTexCoordSets; |
| 452 | 452 |
| 453 typedef GrGLShaderBuilder INHERITED; | 453 typedef GrGLShaderBuilder INHERITED; |
| 454 }; | 454 }; |
| 455 | 455 |
| 456 #endif | 456 #endif |
| OLD | NEW |