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 "GrPipeline.h" | 8 #include "GrPipeline.h" |
9 | 9 |
10 #include "GrBatch.h" | 10 #include "GrBatch.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 (pipelineBuilder.fCoverageStages[i])); | 95 (pipelineBuilder.fCoverageStages[i])); |
96 usesLocalCoords = usesLocalCoords || | 96 usesLocalCoords = usesLocalCoords || |
97 pipelineBuilder.fCoverageStages[i].processor()->usesLo
calCoords(); | 97 pipelineBuilder.fCoverageStages[i].processor()->usesLo
calCoords(); |
98 } | 98 } |
99 | 99 |
100 // let the GP init the batch tracker | 100 // let the GP init the batch tracker |
101 fInitBT.fColorIgnored = SkToBool(optFlags & GrXferProcessor::kIgnoreColor_Op
tFlag); | 101 fInitBT.fColorIgnored = SkToBool(optFlags & GrXferProcessor::kIgnoreColor_Op
tFlag); |
102 fInitBT.fOverrideColor = fInitBT.fColorIgnored ? GrColor_ILLEGAL : overrideC
olor; | 102 fInitBT.fOverrideColor = fInitBT.fColorIgnored ? GrColor_ILLEGAL : overrideC
olor; |
103 fInitBT.fCoverageIgnored = SkToBool(optFlags & GrXferProcessor::kIgnoreCover
age_OptFlag); | 103 fInitBT.fCoverageIgnored = SkToBool(optFlags & GrXferProcessor::kIgnoreCover
age_OptFlag); |
104 fInitBT.fUsesLocalCoords = usesLocalCoords; | 104 fInitBT.fUsesLocalCoords = usesLocalCoords; |
| 105 fInitBT.fCanTweakAlphaForCoverage = |
| 106 SkToBool(optFlags & GrXferProcessor::kCanTweakAlphaForCoverage_OptFlag); |
105 } | 107 } |
106 | 108 |
107 void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelin
eBuilder, | 109 void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelin
eBuilder, |
108 GrXferProcessor::OptFlags flags, | 110 GrXferProcessor::OptFlags flags, |
109 const GrProcOptInfo& colorPOI, | 111 const GrProcOptInfo& colorPOI, |
110 const GrProcOptInfo& coveragePOI
, | 112 const GrProcOptInfo& coveragePOI
, |
111 int* firstColorStageIdx, | 113 int* firstColorStageIdx, |
112 int* firstCoverageStageIdx) { | 114 int* firstCoverageStageIdx) { |
113 fReadsFragPosition = false; | 115 fReadsFragPosition = false; |
114 | 116 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 SkASSERT(this->numFragmentStages() == that.numFragmentStages()); | 151 SkASSERT(this->numFragmentStages() == that.numFragmentStages()); |
150 for (int i = 0; i < this->numFragmentStages(); i++) { | 152 for (int i = 0; i < this->numFragmentStages(); i++) { |
151 | 153 |
152 if (this->getFragmentStage(i) != that.getFragmentStage(i)) { | 154 if (this->getFragmentStage(i) != that.getFragmentStage(i)) { |
153 return false; | 155 return false; |
154 } | 156 } |
155 } | 157 } |
156 return true; | 158 return true; |
157 } | 159 } |
158 | 160 |
OLD | NEW |