| 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 "GrCaps.h" | 10 #include "GrCaps.h" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 } | 179 } |
| 180 } | 180 } |
| 181 } | 181 } |
| 182 | 182 |
| 183 void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelin
eBuilder, | 183 void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelin
eBuilder, |
| 184 GrXferProcessor::OptFlags flags, | 184 GrXferProcessor::OptFlags flags, |
| 185 const GrProcOptInfo& colorPOI, | 185 const GrProcOptInfo& colorPOI, |
| 186 const GrProcOptInfo& coveragePOI
, | 186 const GrProcOptInfo& coveragePOI
, |
| 187 int* firstColorProcessorIdx, | 187 int* firstColorProcessorIdx, |
| 188 int* firstCoverageProcessorIdx)
{ | 188 int* firstCoverageProcessorIdx)
{ |
| 189 fReadsCoverage = !(flags & GrXferProcessor::kIgnoreCoverage_OptFlag); |
| 189 fReadsFragPosition = fXferProcessor->willReadFragmentPosition(); | 190 fReadsFragPosition = fXferProcessor->willReadFragmentPosition(); |
| 190 | 191 |
| 191 if ((flags & GrXferProcessor::kIgnoreColor_OptFlag) || | 192 if ((flags & GrXferProcessor::kIgnoreColor_OptFlag) || |
| 192 (flags & GrXferProcessor::kOverrideColor_OptFlag)) { | 193 (flags & GrXferProcessor::kOverrideColor_OptFlag)) { |
| 193 *firstColorProcessorIdx = pipelineBuilder.numColorFragmentProcessors(); | 194 *firstColorProcessorIdx = pipelineBuilder.numColorFragmentProcessors(); |
| 194 } else { | 195 } else { |
| 195 if (coveragePOI.readsFragPosition()) { | 196 if (coveragePOI.readsFragPosition()) { |
| 196 fReadsFragPosition = true; | 197 fReadsFragPosition = true; |
| 197 } | 198 } |
| 198 } | 199 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 227 } | 228 } |
| 228 | 229 |
| 229 for (int i = 0; i < a.numFragmentProcessors(); i++) { | 230 for (int i = 0; i < a.numFragmentProcessors(); i++) { |
| 230 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore
CoordTransforms)) { | 231 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore
CoordTransforms)) { |
| 231 return false; | 232 return false; |
| 232 } | 233 } |
| 233 } | 234 } |
| 234 return true; | 235 return true; |
| 235 } | 236 } |
| 236 | 237 |
| OLD | NEW |