| 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 "GrBatch.h" | |
| 11 #include "GrBlend.h" | 10 #include "GrBlend.h" |
| 12 #include "GrPaint.h" | 11 #include "GrPaint.h" |
| 13 #include "GrPipeline.h" | 12 #include "GrPipeline.h" |
| 14 #include "GrProcOptInfo.h" | 13 #include "GrProcOptInfo.h" |
| 15 #include "GrXferProcessor.h" | 14 #include "GrXferProcessor.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(SkNEW(GrProcessorDataManager)) |
| 20 , fFlags(0x0) | 20 , fFlags(0x0) |
| 21 , fDrawFace(kBoth_DrawFace) | 21 , fDrawFace(kBoth_DrawFace) |
| 22 , fColorProcInfoValid(false) | 22 , fColorProcInfoValid(false) |
| 23 , fCoverageProcInfoValid(false) | 23 , fCoverageProcInfoValid(false) |
| 24 , fColorCache(GrColor_ILLEGAL) | 24 , fColorCache(GrColor_ILLEGAL) |
| 25 , fCoverageCache(GrColor_ILLEGAL) { | 25 , fCoverageCache(GrColor_ILLEGAL) { |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const { | 178 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const { |
| 179 if (!fCoverageProcInfoValid || coverage != fCoverageCache) { | 179 if (!fCoverageProcInfoValid || coverage != fCoverageCache) { |
| 180 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags; | 180 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags; |
| 181 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), | 181 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), |
| 182 this->numCoverageFragmentStages(
), coverage, flags, | 182 this->numCoverageFragmentStages(
), coverage, flags, |
| 183 true); | 183 true); |
| 184 fCoverageProcInfoValid = true; | 184 fCoverageProcInfoValid = true; |
| 185 fCoverageCache = coverage; | 185 fCoverageCache = coverage; |
| 186 } | 186 } |
| 187 } | 187 } |
| OLD | NEW |