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 #include "GrGLShaderBuilder.h" | 8 #include "GrGLShaderBuilder.h" |
9 #include "GrGLFullProgramBuilder.h" | 9 #include "GrGLFullProgramBuilder.h" |
10 #include "GrGLProgramBuilder.h" | 10 #include "GrGLProgramBuilder.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 fFunctions.append(body); | 90 fFunctions.append(body); |
91 fFunctions.append("}\n\n"); | 91 fFunctions.append("}\n\n"); |
92 } | 92 } |
93 | 93 |
94 void GrGLShaderBuilder::appendTextureLookup(SkString* out, | 94 void GrGLShaderBuilder::appendTextureLookup(SkString* out, |
95 const TextureSampler& sampler, | 95 const TextureSampler& sampler, |
96 const char* coordName, | 96 const char* coordName, |
97 GrSLType varyingType) const { | 97 GrSLType varyingType) const { |
98 append_texture_lookup(out, | 98 append_texture_lookup(out, |
99 fProgramBuilder->gpu(), | 99 fProgramBuilder->gpu(), |
100 fProgramBuilder->getUniformCStr(sampler.samplerUniform
()), | 100 fProgramBuilder->getUniformCStr(sampler.fSamplerUnifor
m), |
101 coordName, | 101 coordName, |
102 sampler.configComponentMask(), | 102 sampler.configComponentMask(), |
103 sampler.swizzle(), | 103 sampler.swizzle(), |
104 varyingType); | 104 varyingType); |
105 } | 105 } |
106 | 106 |
107 void GrGLShaderBuilder::appendTextureLookup(const TextureSampler& sampler, | 107 void GrGLShaderBuilder::appendTextureLookup(const TextureSampler& sampler, |
108 const char* coordName, | 108 const char* coordName, |
109 GrSLType varyingType) { | 109 GrSLType varyingType) { |
110 this->appendTextureLookup(&fCode, sampler, coordName, varyingType); | 110 this->appendTextureLookup(&fCode, sampler, coordName, varyingType); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 coordName, | 153 coordName, |
154 configComponentMask, | 154 configComponentMask, |
155 swizzle, | 155 swizzle, |
156 kVec2f_GrSLType); | 156 kVec2f_GrSLType); |
157 } | 157 } |
158 | 158 |
159 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 159 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
160 GrGLFullShaderBuilder::GrGLFullShaderBuilder(GrGLFullProgramBuilder* program) | 160 GrGLFullShaderBuilder::GrGLFullShaderBuilder(GrGLFullProgramBuilder* program) |
161 : INHERITED(program) | 161 : INHERITED(program) |
162 , fFullProgramBuilder(program) {} | 162 , fFullProgramBuilder(program) {} |
OLD | NEW |