| 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 "GrPipelineBuilder.h" | 8 #include "GrPipelineBuilder.h" |
| 9 | 9 |
| 10 #include "GrBlend.h" | 10 #include "GrBlend.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 int n = fPipelineBuilder->numCoverageFragmentProcessors() - fCoverageEff
ectCnt; | 73 int n = fPipelineBuilder->numCoverageFragmentProcessors() - fCoverageEff
ectCnt; |
| 74 SkASSERT(n >= 0); | 74 SkASSERT(n >= 0); |
| 75 for (int i = 0; i < n; ++i) { | 75 for (int i = 0; i < n; ++i) { |
| 76 fPipelineBuilder->fCoverageFragmentProcessors.fromBack(i)->unref(); | 76 fPipelineBuilder->fCoverageFragmentProcessors.fromBack(i)->unref(); |
| 77 } | 77 } |
| 78 fPipelineBuilder->fCoverageFragmentProcessors.pop_back_n(n); | 78 fPipelineBuilder->fCoverageFragmentProcessors.pop_back_n(n); |
| 79 SkDEBUGCODE(--fPipelineBuilder->fBlockEffectRemovalCnt;) | 79 SkDEBUGCODE(--fPipelineBuilder->fBlockEffectRemovalCnt;) |
| 80 fPipelineBuilder->getProcessorDataManager()->restoreToSaveMarker(/*fSave
Marker*/); | 80 fPipelineBuilder->getProcessorDataManager()->restoreToSaveMarker(/*fSave
Marker*/); |
| 81 } | 81 } |
| 82 fPipelineBuilder = const_cast<GrPipelineBuilder*>(pipelineBuilder); | 82 fPipelineBuilder = const_cast<GrPipelineBuilder*>(pipelineBuilder); |
| 83 if (NULL != pipelineBuilder) { | 83 if (nullptr != pipelineBuilder) { |
| 84 fColorEffectCnt = pipelineBuilder->numColorFragmentProcessors(); | 84 fColorEffectCnt = pipelineBuilder->numColorFragmentProcessors(); |
| 85 fCoverageEffectCnt = pipelineBuilder->numCoverageFragmentProcessors(); | 85 fCoverageEffectCnt = pipelineBuilder->numCoverageFragmentProcessors(); |
| 86 SkDEBUGCODE(++pipelineBuilder->fBlockEffectRemovalCnt;) | 86 SkDEBUGCODE(++pipelineBuilder->fBlockEffectRemovalCnt;) |
| 87 fSaveMarker = pipelineBuilder->processorDataManager()->currentSaveMarker
(); | 87 fSaveMarker = pipelineBuilder->processorDataManager()->currentSaveMarker
(); |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 | 90 |
| 91 //////////////////////////////////////////////////////////////////////////////// | 91 //////////////////////////////////////////////////////////////////////////////// |
| 92 | 92 |
| 93 GrPipelineBuilder::~GrPipelineBuilder() { | 93 GrPipelineBuilder::~GrPipelineBuilder() { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 115 | 115 |
| 116 void GrPipelineBuilder::calcColorInvariantOutput(const GrDrawBatch* batch) const
{ | 116 void GrPipelineBuilder::calcColorInvariantOutput(const GrDrawBatch* batch) const
{ |
| 117 fColorProcInfo.calcColorWithBatch(batch, fColorFragmentProcessors.begin(), | 117 fColorProcInfo.calcColorWithBatch(batch, fColorFragmentProcessors.begin(), |
| 118 this->numColorFragmentProcessors()); | 118 this->numColorFragmentProcessors()); |
| 119 } | 119 } |
| 120 | 120 |
| 121 void GrPipelineBuilder::calcCoverageInvariantOutput(const GrDrawBatch* batch) co
nst { | 121 void GrPipelineBuilder::calcCoverageInvariantOutput(const GrDrawBatch* batch) co
nst { |
| 122 fCoverageProcInfo.calcCoverageWithBatch(batch, fCoverageFragmentProcessors.b
egin(), | 122 fCoverageProcInfo.calcCoverageWithBatch(batch, fCoverageFragmentProcessors.b
egin(), |
| 123 this->numCoverageFragmentProcessors(
)); | 123 this->numCoverageFragmentProcessors(
)); |
| 124 } | 124 } |
| OLD | NEW |