| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |