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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 pipeline->fStencilSettings = builder.getStencil(); | 74 pipeline->fStencilSettings = builder.getStencil(); |
75 pipeline->fDrawFace = builder.getDrawFace(); | 75 pipeline->fDrawFace = builder.getDrawFace(); |
76 | 76 |
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()) { |
| 85 pipeline->fFlags |= kDisableOutputConversionToSRGB_Flag; |
| 86 } |
84 | 87 |
85 int firstColorProcessorIdx = args.fOpts.fColorPOI.firstEffectiveProcessorInd
ex(); | 88 int firstColorProcessorIdx = args.fOpts.fColorPOI.firstEffectiveProcessorInd
ex(); |
86 | 89 |
87 // TODO: Once we can handle single or four channel input into coverage GrFra
gmentProcessors | 90 // TODO: Once we can handle single or four channel input into coverage GrFra
gmentProcessors |
88 // then we can use GrPipelineBuilder's coverageProcInfo (like color above) t
o set this initial | 91 // then we can use GrPipelineBuilder's coverageProcInfo (like color above) t
o set this initial |
89 // information. | 92 // information. |
90 int firstCoverageProcessorIdx = 0; | 93 int firstCoverageProcessorIdx = 0; |
91 | 94 |
92 pipeline->adjustProgramFromOptimizations(builder, optFlags, args.fOpts.fColo
rPOI, | 95 pipeline->adjustProgramFromOptimizations(builder, optFlags, args.fOpts.fColo
rPOI, |
93 args.fOpts.fCoveragePOI, &firstColo
rProcessorIdx, | 96 args.fOpts.fCoveragePOI, &firstColo
rProcessorIdx, |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 } | 222 } |
220 | 223 |
221 for (int i = 0; i < a.numFragmentProcessors(); i++) { | 224 for (int i = 0; i < a.numFragmentProcessors(); i++) { |
222 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore
CoordTransforms)) { | 225 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore
CoordTransforms)) { |
223 return false; | 226 return false; |
224 } | 227 } |
225 } | 228 } |
226 return true; | 229 return true; |
227 } | 230 } |
228 | 231 |
OLD | NEW |