| 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" |
| 11 #include "GrPaint.h" | 11 #include "GrPaint.h" |
| 12 #include "GrPipeline.h" | 12 #include "GrPipeline.h" |
| 13 #include "GrProcOptInfo.h" | 13 #include "GrProcOptInfo.h" |
| 14 #include "GrXferProcessor.h" | 14 #include "GrXferProcessor.h" |
| 15 #include "batches/GrBatch.h" | 15 #include "batches/GrBatch.h" |
| 16 #include "effects/GrPorterDuffXferProcessor.h" | 16 #include "effects/GrPorterDuffXferProcessor.h" |
| 17 | 17 |
| 18 GrPipelineBuilder::GrPipelineBuilder() | 18 GrPipelineBuilder::GrPipelineBuilder() |
| 19 : fProcDataManager(SkNEW(GrProcessorDataManager)) | 19 : fProcDataManager(new GrProcessorDataManager), fFlags(0x0), fDrawFace(kBoth
_DrawFace) { |
| 20 , fFlags(0x0) | |
| 21 , fDrawFace(kBoth_DrawFace) { | |
| 22 SkDEBUGCODE(fBlockEffectRemovalCnt = 0;) | 20 SkDEBUGCODE(fBlockEffectRemovalCnt = 0;) |
| 23 } | 21 } |
| 24 | 22 |
| 25 GrPipelineBuilder& GrPipelineBuilder::operator=(const GrPipelineBuilder& that) { | 23 GrPipelineBuilder& GrPipelineBuilder::operator=(const GrPipelineBuilder& that) { |
| 26 fProcDataManager.reset(SkNEW_ARGS(GrProcessorDataManager, (*that.processorDa
taManager()))); | 24 fProcDataManager.reset(new GrProcessorDataManager(*that.processorDataManager
())); |
| 27 fRenderTarget.reset(SkSafeRef(that.fRenderTarget.get())); | 25 fRenderTarget.reset(SkSafeRef(that.fRenderTarget.get())); |
| 28 fFlags = that.fFlags; | 26 fFlags = that.fFlags; |
| 29 fStencilSettings = that.fStencilSettings; | 27 fStencilSettings = that.fStencilSettings; |
| 30 fDrawFace = that.fDrawFace; | 28 fDrawFace = that.fDrawFace; |
| 31 fXPFactory.reset(SkRef(that.getXPFactory())); | 29 fXPFactory.reset(SkRef(that.getXPFactory())); |
| 32 fColorStages = that.fColorStages; | 30 fColorStages = that.fColorStages; |
| 33 fCoverageStages = that.fCoverageStages; | 31 fCoverageStages = that.fCoverageStages; |
| 34 fClip = that.fClip; | 32 fClip = that.fClip; |
| 35 | 33 |
| 36 return *this; | 34 return *this; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 119 |
| 122 void GrPipelineBuilder::calcColorInvariantOutput(const GrDrawBatch* batch) const
{ | 120 void GrPipelineBuilder::calcColorInvariantOutput(const GrDrawBatch* batch) const
{ |
| 123 fColorProcInfo.calcColorWithBatch(batch, fColorStages.begin(), this->numColo
rFragmentStages()); | 121 fColorProcInfo.calcColorWithBatch(batch, fColorStages.begin(), this->numColo
rFragmentStages()); |
| 124 } | 122 } |
| 125 | 123 |
| 126 void GrPipelineBuilder::calcCoverageInvariantOutput(const GrDrawBatch* batch) co
nst { | 124 void GrPipelineBuilder::calcCoverageInvariantOutput(const GrDrawBatch* batch) co
nst { |
| 127 fCoverageProcInfo.calcCoverageWithBatch(batch, fCoverageStages.begin(), | 125 fCoverageProcInfo.calcCoverageWithBatch(batch, fCoverageStages.begin(), |
| 128 this->numCoverageFragmentStages()); | 126 this->numCoverageFragmentStages()); |
| 129 } | 127 } |
| 130 | 128 |
| OLD | NEW |