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

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

Issue 1453623003: Move glsl onto EmitArgs struct for emitCode (Closed) Base URL: https://skia.googlesource.com/skia.git@moveShaders
Patch Set: nit Created 5 years, 1 month 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/GrGLSLFragmentProcessor.h ('k') | src/gpu/glsl/GrGLSLPrimitiveProcessor.h » ('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 #include "GrGLSLFragmentProcessor.h" 8 #include "GrGLSLFragmentProcessor.h"
9 #include "GrFragmentProcessor.h" 9 #include "GrFragmentProcessor.h"
10 #include "GrProcessor.h" 10 #include "GrProcessor.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 if (childProc.numTextures() > 0) { 88 if (childProc.numTextures() > 0) {
89 childSamplers.push_back_n(childProc.numTextures(), &args.fSamplers[first SamplerAt]); 89 childSamplers.push_back_n(childProc.numTextures(), &args.fSamplers[first SamplerAt]);
90 } 90 }
91 91
92 // emit the code for the child in its own scope 92 // emit the code for the child in its own scope
93 fragBuilder->codeAppend("{\n"); 93 fragBuilder->codeAppend("{\n");
94 fragBuilder->codeAppendf("// Child Index %d (mangle: %s): %s\n", childIndex, 94 fragBuilder->codeAppendf("// Child Index %d (mangle: %s): %s\n", childIndex,
95 fragBuilder->getMangleString().c_str(), childProc.n ame()); 95 fragBuilder->getMangleString().c_str(), childProc.n ame());
96 EmitArgs childArgs(args.fBuilder, 96 EmitArgs childArgs(args.fBuilder,
97 fragBuilder, 97 fragBuilder,
98 args.fGLSLCaps,
98 childProc, 99 childProc,
99 outputColor, 100 outputColor,
100 inputColor, 101 inputColor,
101 childCoords, 102 childCoords,
102 childSamplers); 103 childSamplers);
103 this->childProcessor(childIndex)->emitCode(childArgs); 104 this->childProcessor(childIndex)->emitCode(childArgs);
104 fragBuilder->codeAppend("}\n"); 105 fragBuilder->codeAppend("}\n");
105 106
106 fragBuilder->onAfterChildProcEmitCode(); 107 fragBuilder->onAfterChildProcEmitCode();
107 } 108 }
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLFragmentProcessor.h ('k') | src/gpu/glsl/GrGLSLPrimitiveProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698