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

Side by Side Diff: src/gpu/gl/GrGLShaderBuilder.cpp

Issue 305203002: Use GrGLShaderBuilder::GenProgramOutput in GrGLProgram. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: restore autotunref Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.h ('k') | no next file » | 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 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 #include "gl/GrGLShaderBuilder.h" 8 #include "gl/GrGLShaderBuilder.h"
9 #include "gl/GrGLProgram.h" 9 #include "gl/GrGLProgram.h"
10 #include "gl/GrGLUniformHandle.h" 10 #include "gl/GrGLUniformHandle.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 GrGLShaderVar::kOut_TypeModifier, 187 GrGLShaderVar::kOut_TypeModifier,
188 declared_color_output_name()); 188 declared_color_output_name());
189 fHasCustomColorOutput = true; 189 fHasCustomColorOutput = true;
190 } 190 }
191 191
192 this->emitCodeBeforeEffects(&inputColor, &inputCoverage); 192 this->emitCodeBeforeEffects(&inputColor, &inputCoverage);
193 193
194 /////////////////////////////////////////////////////////////////////////// 194 ///////////////////////////////////////////////////////////////////////////
195 // emit the per-effect code for both color and coverage effects 195 // emit the per-effect code for both color and coverage effects
196 196
197 fOutput.fColorEffects = 197 fOutput.fColorEffects.reset(this->createAndEmitEffects(colorStages,
198 this->createAndEmitEffects(colorStages, 198 this->desc().getEffec tKeys(),
199 this->desc().getEffectKeys(), 199 this->desc().numColor Effects(),
200 this->desc().numColorEffects(), 200 &inputColor));
201 &inputColor);
202 201
203 fOutput.fCoverageEffects = 202 fOutput.fCoverageEffects.reset(this->createAndEmitEffects(coverageStages,
204 this->createAndEmitEffects(coverageStages,
205 this->desc().getEffectKeys() + this->desc(). numColorEffects(), 203 this->desc().getEffectKeys() + this->desc(). numColorEffects(),
206 this->desc().numCoverageEffects(), 204 this->desc().numCoverageEffects(),
207 &inputCoverage); 205 &inputCoverage));
208 206
209 this->emitCodeAfterEffects(); 207 this->emitCodeAfterEffects();
210 208
211 /////////////////////////////////////////////////////////////////////////// 209 ///////////////////////////////////////////////////////////////////////////
212 // write the secondary color output if necessary 210 // write the secondary color output if necessary
213 if (GrGLProgramDesc::CoverageOutputUsesSecondaryOutput(header.fCoverageOutpu t)) { 211 if (GrGLProgramDesc::CoverageOutputUsesSecondaryOutput(header.fCoverageOutpu t)) {
214 const char* secondaryOutputName = this->enableSecondaryOutput(); 212 const char* secondaryOutputName = this->enableSecondaryOutput();
215 213
216 // default coeff to ones for kCoverage_DualSrcOutput 214 // default coeff to ones for kCoverage_DualSrcOutput
217 GrGLSLExpr4 coeff(1); 215 GrGLSLExpr4 coeff(1);
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 1093
1096 GrGLPathTexGenProgramEffectsBuilder pathTexGenEffectsBuilder(this, 1094 GrGLPathTexGenProgramEffectsBuilder pathTexGenEffectsBuilder(this,
1097 effectCnt); 1095 effectCnt);
1098 this->INHERITED::createAndEmitEffects(&pathTexGenEffectsBuilder, 1096 this->INHERITED::createAndEmitEffects(&pathTexGenEffectsBuilder,
1099 effectStages, 1097 effectStages,
1100 effectKeys, 1098 effectKeys,
1101 effectCnt, 1099 effectCnt,
1102 inOutFSColor); 1100 inOutFSColor);
1103 return pathTexGenEffectsBuilder.finish(); 1101 return pathTexGenEffectsBuilder.finish();
1104 } 1102 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698