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

Side by Side Diff: src/gpu/gl/builders/GrGLProgramBuilder.cpp

Issue 956363003: Cleanup in GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 5 years, 9 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/GrGLProgramDesc.cpp ('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 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 "GrGLProgramBuilder.h" 8 #include "GrGLProgramBuilder.h"
9 9
10 #include "gl/GrGLGeometryProcessor.h" 10 #include "gl/GrGLGeometryProcessor.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 for (int t = 0; t < processor->numTransforms(); t++) { 196 for (int t = 0; t < processor->numTransforms(); t++) {
197 procCoords.push_back(&processor->coordTransform(t)); 197 procCoords.push_back(&processor->coordTransform(t));
198 } 198 }
199 } 199 }
200 200
201 const GrPrimitiveProcessor& primProc = this->primitiveProcessor(); 201 const GrPrimitiveProcessor& primProc = this->primitiveProcessor();
202 this->emitAndInstallProc(primProc, inputColor, inputCoverage); 202 this->emitAndInstallProc(primProc, inputColor, inputCoverage);
203 203
204 fFragmentProcessors.reset(SkNEW(GrGLInstalledFragProcs)); 204 fFragmentProcessors.reset(SkNEW(GrGLInstalledFragProcs));
205 int numProcs = this->pipeline().numFragmentStages(); 205 int numProcs = this->pipeline().numFragmentStages();
206 this->emitAndInstallFragProcs(0, this->pipeline().numColorStages(), inputCol or); 206 this->emitAndInstallFragProcs(0, this->pipeline().numColorFragmentStages(), inputColor);
207 this->emitAndInstallFragProcs(this->pipeline().numColorStages(), numProcs, inputCoverage); 207 this->emitAndInstallFragProcs(this->pipeline().numColorFragmentStages(), num Procs,
208 inputCoverage);
208 this->emitAndInstallXferProc(*this->pipeline().getXferProcessor(), *inputCol or, *inputCoverage); 209 this->emitAndInstallXferProc(*this->pipeline().getXferProcessor(), *inputCol or, *inputCoverage);
209 } 210 }
210 211
211 void GrGLProgramBuilder::emitAndInstallFragProcs(int procOffset, 212 void GrGLProgramBuilder::emitAndInstallFragProcs(int procOffset,
212 int numProcs, 213 int numProcs,
213 GrGLSLExpr4* inOut) { 214 GrGLSLExpr4* inOut) {
214 for (int e = procOffset; e < numProcs; ++e) { 215 for (int e = procOffset; e < numProcs; ++e) {
215 GrGLSLExpr4 output; 216 GrGLSLExpr4 output;
216 const GrPendingFragmentStage& stage = this->pipeline().getFragmentStage( e); 217 const GrPendingFragmentStage& stage = this->pipeline().getFragmentStage( e);
217 this->emitAndInstallProc(stage, e, *inOut, &output); 218 this->emitAndInstallProc(stage, e, *inOut, &output);
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 } 493 }
493 494
494 //////////////////////////////////////////////////////////////////////////////// /////////////////// 495 //////////////////////////////////////////////////////////////////////////////// ///////////////////
495 496
496 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { 497 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() {
497 int numProcs = fProcs.count(); 498 int numProcs = fProcs.count();
498 for (int e = 0; e < numProcs; ++e) { 499 for (int e = 0; e < numProcs; ++e) {
499 SkDELETE(fProcs[e]); 500 SkDELETE(fProcs[e]);
500 } 501 }
501 } 502 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698