Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Side by Side Diff: src/gpu/glsl/GrGLSLProgramBuilder.h

Issue 1885863004: Refactor how we store and use samplers in Ganesh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698