| OLD | NEW |
| 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 "GrAutoLocaleSetter.h" | 10 #include "GrAutoLocaleSetter.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 | 88 |
| 89 this->emitAndInstallProc(primProc, inputColor, inputCoverage); | 89 this->emitAndInstallProc(primProc, inputColor, inputCoverage); |
| 90 | 90 |
| 91 fFragmentProcessors.reset(new GrGLInstalledFragProcs); | 91 fFragmentProcessors.reset(new GrGLInstalledFragProcs); |
| 92 int numProcs = this->pipeline().numFragmentProcessors(); | 92 int numProcs = this->pipeline().numFragmentProcessors(); |
| 93 this->emitAndInstallFragProcs(0, this->pipeline().numColorFragmentProcessors
(), inputColor); | 93 this->emitAndInstallFragProcs(0, this->pipeline().numColorFragmentProcessors
(), inputColor); |
| 94 this->emitAndInstallFragProcs(this->pipeline().numColorFragmentProcessors(),
numProcs, | 94 this->emitAndInstallFragProcs(this->pipeline().numColorFragmentProcessors(),
numProcs, |
| 95 inputCoverage); | 95 inputCoverage); |
| 96 this->emitAndInstallXferProc(*this->pipeline().getXferProcessor(), *inputCol
or, *inputCoverage, | 96 this->emitAndInstallXferProc(this->pipeline().getXferProcessor(), *inputColo
r, *inputCoverage, |
| 97 this->pipeline().ignoresCoverage()); | 97 this->pipeline().ignoresCoverage()); |
| 98 return true; | 98 return true; |
| 99 } | 99 } |
| 100 | 100 |
| 101 void GrGLProgramBuilder::emitAndInstallFragProcs(int procOffset, | 101 void GrGLProgramBuilder::emitAndInstallFragProcs(int procOffset, |
| 102 int numProcs, | 102 int numProcs, |
| 103 GrGLSLExpr4* inOut) { | 103 GrGLSLExpr4* inOut) { |
| 104 for (int i = procOffset; i < numProcs; ++i) { | 104 for (int i = procOffset; i < numProcs; ++i) { |
| 105 GrGLSLExpr4 output; | 105 GrGLSLExpr4 output; |
| 106 const GrFragmentProcessor& fp = this->pipeline().getFragmentProcessor(i)
; | 106 const GrFragmentProcessor& fp = this->pipeline().getFragmentProcessor(i)
; |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 } | 478 } |
| 479 | 479 |
| 480 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 480 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 481 | 481 |
| 482 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { | 482 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { |
| 483 int numProcs = fProcs.count(); | 483 int numProcs = fProcs.count(); |
| 484 for (int i = 0; i < numProcs; ++i) { | 484 for (int i = 0; i < numProcs; ++i) { |
| 485 delete fProcs[i]; | 485 delete fProcs[i]; |
| 486 } | 486 } |
| 487 } | 487 } |
| OLD | NEW |