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 "batches/GrDrawBatch.h" | |
egdaniel
2015/11/24 00:08:13
is this include needed given that you've only dele
| |
16 #include "effects/GrPorterDuffXferProcessor.h" | 17 #include "effects/GrPorterDuffXferProcessor.h" |
17 | 18 |
18 GrPipelineBuilder::GrPipelineBuilder() | 19 GrPipelineBuilder::GrPipelineBuilder() |
19 : fFlags(0x0), fDrawFace(kBoth_DrawFace) { | 20 : fFlags(0x0), fDrawFace(kBoth_DrawFace) { |
20 SkDEBUGCODE(fBlockEffectRemovalCnt = 0;) | 21 SkDEBUGCODE(fBlockEffectRemovalCnt = 0;) |
21 } | 22 } |
22 | 23 |
23 GrPipelineBuilder::GrPipelineBuilder(const GrPaint& paint, GrRenderTarget* rt, c onst GrClip& clip) { | 24 GrPipelineBuilder::GrPipelineBuilder(const GrPaint& paint, GrRenderTarget* rt, c onst GrClip& clip) { |
24 SkDEBUGCODE(fBlockEffectRemovalCnt = 0;) | 25 SkDEBUGCODE(fBlockEffectRemovalCnt = 0;) |
25 | 26 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 | 90 |
90 GrPipelineBuilder::~GrPipelineBuilder() { | 91 GrPipelineBuilder::~GrPipelineBuilder() { |
91 SkASSERT(0 == fBlockEffectRemovalCnt); | 92 SkASSERT(0 == fBlockEffectRemovalCnt); |
92 for (int i = 0; i < fColorFragmentProcessors.count(); ++i) { | 93 for (int i = 0; i < fColorFragmentProcessors.count(); ++i) { |
93 fColorFragmentProcessors[i]->unref(); | 94 fColorFragmentProcessors[i]->unref(); |
94 } | 95 } |
95 for (int i = 0; i < fCoverageFragmentProcessors.count(); ++i) { | 96 for (int i = 0; i < fCoverageFragmentProcessors.count(); ++i) { |
96 fCoverageFragmentProcessors[i]->unref(); | 97 fCoverageFragmentProcessors[i]->unref(); |
97 } | 98 } |
98 } | 99 } |
99 | |
100 //////////////////////////////////////////////////////////////////////////////// | |
101 | |
102 void GrPipelineBuilder::calcColorInvariantOutput(const GrDrawBatch* batch) const { | |
103 fColorProcInfo.calcColorWithBatch(batch, fColorFragmentProcessors.begin(), | |
104 this->numColorFragmentProcessors()); | |
105 } | |
106 | |
107 void GrPipelineBuilder::calcCoverageInvariantOutput(const GrDrawBatch* batch) co nst { | |
108 fCoverageProcInfo.calcCoverageWithBatch(batch, fCoverageFragmentProcessors.b egin(), | |
109 this->numCoverageFragmentProcessors( )); | |
110 } | |
111 | |
OLD | NEW |