| 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.hasSampleLocations()) { |
| 85 SkASSERT(pipeline->isHWAntialiasState()); |
| 86 SkASSERT(args.fCaps->sampleLocationsSupport()); |
| 87 pipeline->fFlags |= kSampleLocations_Flag; |
| 88 } |
| 84 | 89 |
| 85 int firstColorProcessorIdx = args.fOpts.fColorPOI.firstEffectiveProcessorInd
ex(); | 90 int firstColorProcessorIdx = args.fOpts.fColorPOI.firstEffectiveProcessorInd
ex(); |
| 86 | 91 |
| 87 // TODO: Once we can handle single or four channel input into coverage GrFra
gmentProcessors | 92 // 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 | 93 // then we can use GrPipelineBuilder's coverageProcInfo (like color above) t
o set this initial |
| 89 // information. | 94 // information. |
| 90 int firstCoverageProcessorIdx = 0; | 95 int firstCoverageProcessorIdx = 0; |
| 91 | 96 |
| 92 pipeline->adjustProgramFromOptimizations(builder, optFlags, args.fOpts.fColo
rPOI, | 97 pipeline->adjustProgramFromOptimizations(builder, optFlags, args.fOpts.fColo
rPOI, |
| 93 args.fOpts.fCoveragePOI, &firstColo
rProcessorIdx, | 98 args.fOpts.fCoveragePOI, &firstColo
rProcessorIdx, |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 } | 233 } |
| 229 | 234 |
| 230 for (int i = 0; i < a.numFragmentProcessors(); i++) { | 235 for (int i = 0; i < a.numFragmentProcessors(); i++) { |
| 231 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore
CoordTransforms)) { | 236 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore
CoordTransforms)) { |
| 232 return false; | 237 return false; |
| 233 } | 238 } |
| 234 } | 239 } |
| 235 return true; | 240 return true; |
| 236 } | 241 } |
| 237 | 242 |
| OLD | NEW |