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

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

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/glsl/GrGLSLProgramBuilder.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 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 #include "glsl/GrGLSLProgramBuilder.h" 8 #include "glsl/GrGLSLProgramBuilder.h"
9 9
10 #include "GrPipeline.h" 10 #include "GrPipeline.h"
11 #include "glsl/GrGLSLFragmentProcessor.h" 11 #include "glsl/GrGLSLFragmentProcessor.h"
12 #include "glsl/GrGLSLGeometryProcessor.h" 12 #include "glsl/GrGLSLGeometryProcessor.h"
13 #include "glsl/GrGLSLVarying.h"
13 #include "glsl/GrGLSLXferProcessor.h" 14 #include "glsl/GrGLSLXferProcessor.h"
14 15
15 const int GrGLSLProgramBuilder::kVarsPerBlock = 8; 16 const int GrGLSLProgramBuilder::kVarsPerBlock = 8;
16 17
17 GrGLSLProgramBuilder::GrGLSLProgramBuilder(const DrawArgs& args) 18 GrGLSLProgramBuilder::GrGLSLProgramBuilder(const DrawArgs& args)
18 : fVS(this) 19 : fVS(this)
19 , fGS(this) 20 , fGS(this)
20 , fFS(this, args.fDesc->header().fFragPosKey) 21 , fFS(this, args.fDesc->header().fFragPosKey)
21 , fStageIndex(-1) 22 , fStageIndex(-1)
22 , fArgs(args) 23 , fArgs(args)
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 kFloat_GrSLType, kDefault_Gr SLPrecision, 280 kFloat_GrSLType, kDefault_Gr SLPrecision,
280 name, false, 0, outName); 281 name, false, 0, outName);
281 } 282 }
282 283
283 void GrGLSLProgramBuilder::cleanupFragmentProcessors() { 284 void GrGLSLProgramBuilder::cleanupFragmentProcessors() {
284 for (int i = 0; i < fFragmentProcessors.count(); ++i) { 285 for (int i = 0; i < fFragmentProcessors.count(); ++i) {
285 delete fFragmentProcessors[i]; 286 delete fFragmentProcessors[i];
286 } 287 }
287 } 288 }
288 289
290 void GrGLSLProgramBuilder::finalizeShaders() {
291 this->varyingHandler()->finalize();
292 fVS.finalize(GrGLSLUniformHandler::kVertex_Visibility);
293 fFS.finalize(GrGLSLUniformHandler::kFragment_Visibility);
294
295 }
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLProgramBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698