OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrGLSLProgramBuilder_DEFINED | 8 #ifndef GrGLSLProgramBuilder_DEFINED |
9 #define GrGLSLProgramBuilder_DEFINED | 9 #define GrGLSLProgramBuilder_DEFINED |
10 | 10 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 void emitAndInstallFragProcs(int procOffset, int numProcs, GrGLSLExpr4* inOu
t); | 139 void emitAndInstallFragProcs(int procOffset, int numProcs, GrGLSLExpr4* inOu
t); |
140 void emitAndInstallFragProc(const GrFragmentProcessor&, | 140 void emitAndInstallFragProc(const GrFragmentProcessor&, |
141 int index, | 141 int index, |
142 const GrGLSLExpr4& input, | 142 const GrGLSLExpr4& input, |
143 GrGLSLExpr4* output); | 143 GrGLSLExpr4* output); |
144 void emitAndInstallXferProc(const GrXferProcessor&, | 144 void emitAndInstallXferProc(const GrXferProcessor&, |
145 const GrGLSLExpr4& colorIn, | 145 const GrGLSLExpr4& colorIn, |
146 const GrGLSLExpr4& coverageIn, | 146 const GrGLSLExpr4& coverageIn, |
147 bool ignoresCoverage, | 147 bool ignoresCoverage, |
148 GrPixelLocalStorageState plsState); | 148 GrPixelLocalStorageState plsState); |
| 149 |
| 150 typedef GrGLSLUniformHandler::SamplerHandle SamplerHandle; |
| 151 |
149 void emitSamplers(const GrProcessor& processor, | 152 void emitSamplers(const GrProcessor& processor, |
150 GrGLSLSampler::SamplerArray* outTexSamplers, | 153 SkTArray<SamplerHandle>* outTexSamplers, |
151 GrGLSLSampler::SamplerArray* outBufferSamplers); | 154 SkTArray<SamplerHandle>* outBufferSamplers); |
152 void emitSampler(GrSLType samplerType, | 155 void emitSampler(GrSLType samplerType, |
153 GrPixelConfig, | 156 GrPixelConfig, |
154 const char* name, | 157 const char* name, |
155 GrShaderFlags visibility, | 158 GrShaderFlags visibility, |
156 GrGLSLSampler::SamplerArray* outSamplers); | 159 SkTArray<SamplerHandle>* outSamplers); |
157 void emitFSOutputSwizzle(bool hasSecondaryOutput); | 160 void emitFSOutputSwizzle(bool hasSecondaryOutput); |
158 bool checkSamplerCounts(); | 161 bool checkSamplerCounts(); |
159 | 162 |
160 #ifdef SK_DEBUG | 163 #ifdef SK_DEBUG |
161 void verify(const GrPrimitiveProcessor&); | 164 void verify(const GrPrimitiveProcessor&); |
162 void verify(const GrXferProcessor&); | 165 void verify(const GrXferProcessor&); |
163 void verify(const GrFragmentProcessor&); | 166 void verify(const GrFragmentProcessor&); |
164 #endif | 167 #endif |
165 | 168 |
166 GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms; | 169 GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms; |
167 GrGLSLPrimitiveProcessor::TransformsOut fOutCoords; | 170 GrGLSLPrimitiveProcessor::TransformsOut fOutCoords; |
168 int fNumVertexSamplers; | 171 int fNumVertexSamplers; |
169 int fNumGeometrySamplers; | 172 int fNumGeometrySamplers; |
170 int fNumFragmentSamplers; | 173 int fNumFragmentSamplers; |
171 }; | 174 }; |
172 | 175 |
173 #endif | 176 #endif |
OLD | NEW |