| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 pipeline->fFlags = 0; | 77 pipeline->fFlags = 0; |
| 78 if (builder.isHWAntialias()) { | 78 if (builder.isHWAntialias()) { |
| 79 pipeline->fFlags |= kHWAA_Flag; | 79 pipeline->fFlags |= kHWAA_Flag; |
| 80 } | 80 } |
| 81 if (builder.snapVerticesToPixelCenters()) { | 81 if (builder.snapVerticesToPixelCenters()) { |
| 82 pipeline->fFlags |= kSnapVertices_Flag; | 82 pipeline->fFlags |= kSnapVertices_Flag; |
| 83 } | 83 } |
| 84 if (builder.getDisableOutputConversionToSRGB()) { | 84 if (builder.getDisableOutputConversionToSRGB()) { |
| 85 pipeline->fFlags |= kDisableOutputConversionToSRGB_Flag; | 85 pipeline->fFlags |= kDisableOutputConversionToSRGB_Flag; |
| 86 } | 86 } |
| 87 if (builder.getAllowSRGBInputs()) { |
| 88 pipeline->fFlags |= kAllowSRGBInputs_Flag; |
| 89 } |
| 87 | 90 |
| 88 int firstColorProcessorIdx = args.fOpts.fColorPOI.firstEffectiveProcessorInd
ex(); | 91 int firstColorProcessorIdx = args.fOpts.fColorPOI.firstEffectiveProcessorInd
ex(); |
| 89 | 92 |
| 90 // TODO: Once we can handle single or four channel input into coverage GrFra
gmentProcessors | 93 // TODO: Once we can handle single or four channel input into coverage GrFra
gmentProcessors |
| 91 // then we can use GrPipelineBuilder's coverageProcInfo (like color above) t
o set this initial | 94 // then we can use GrPipelineBuilder's coverageProcInfo (like color above) t
o set this initial |
| 92 // information. | 95 // information. |
| 93 int firstCoverageProcessorIdx = 0; | 96 int firstCoverageProcessorIdx = 0; |
| 94 | 97 |
| 95 pipeline->adjustProgramFromOptimizations(builder, optFlags, args.fOpts.fColo
rPOI, | 98 pipeline->adjustProgramFromOptimizations(builder, optFlags, args.fOpts.fColo
rPOI, |
| 96 args.fOpts.fCoveragePOI, &firstColo
rProcessorIdx, | 99 args.fOpts.fCoveragePOI, &firstColo
rProcessorIdx, |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 } | 224 } |
| 222 } | 225 } |
| 223 | 226 |
| 224 for (int i = 0; i < a.numFragmentProcessors(); i++) { | 227 for (int i = 0; i < a.numFragmentProcessors(); i++) { |
| 225 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore
CoordTransforms)) { | 228 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore
CoordTransforms)) { |
| 226 return false; | 229 return false; |
| 227 } | 230 } |
| 228 } | 231 } |
| 229 return true; | 232 return true; |
| 230 } | 233 } |
| OLD | NEW |