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

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

Issue 1689703002: Finalize gpu shaders in ProgramBuilding. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | src/gpu/glsl/GrGLSLProgramBuilder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 GrGLSLXferProcessor* fXferProcessor; 91 GrGLSLXferProcessor* fXferProcessor;
92 GrGLSLFragProcs fFragmentProcessors; 92 GrGLSLFragProcs fFragmentProcessors;
93 93
94 protected: 94 protected:
95 explicit GrGLSLProgramBuilder(const DrawArgs& args); 95 explicit GrGLSLProgramBuilder(const DrawArgs& args);
96 96
97 bool emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr4* inputCoverage , int maxTextures); 97 bool emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr4* inputCoverage , int maxTextures);
98 98
99 void cleanupFragmentProcessors(); 99 void cleanupFragmentProcessors();
100 100
101 void finalizeShaders();
102
101 private: 103 private:
102 // reset is called by program creator between each processor's emit code. I t increments the 104 // reset is called by program creator between each processor's emit code. I t increments the
103 // stage offset for variable name mangling, and also ensures verfication var iables in the 105 // stage offset for variable name mangling, and also ensures verfication var iables in the
104 // fragment shader are cleared. 106 // fragment shader are cleared.
105 void reset() { 107 void reset() {
106 this->addStage(); 108 this->addStage();
107 fFS.reset(); 109 fFS.reset();
108 } 110 }
109 void addStage() { fStageIndex++; } 111 void addStage() { fStageIndex++; }
110 112
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 void verify(const GrFragmentProcessor&); 147 void verify(const GrFragmentProcessor&);
146 148
147 virtual void emitSamplers(const GrProcessor& processor, 149 virtual void emitSamplers(const GrProcessor& processor,
148 GrGLSLTextureSampler::TextureSamplerArray* outSamp lers) = 0; 150 GrGLSLTextureSampler::TextureSamplerArray* outSamp lers) = 0;
149 151
150 GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms; 152 GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms;
151 GrGLSLPrimitiveProcessor::TransformsOut fOutCoords; 153 GrGLSLPrimitiveProcessor::TransformsOut fOutCoords;
152 }; 154 };
153 155
154 #endif 156 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | src/gpu/glsl/GrGLSLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698