| 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 "GrPipelineBuilder.h" | 8 #include "GrPipelineBuilder.h" |
| 9 | 9 |
| 10 #include "GrBlend.h" | 10 #include "GrBlend.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 fCoverageFragmentProcessors.emplace_back(SkRef(paint.getCoverageFragment
Processor(i))); | 34 fCoverageFragmentProcessors.emplace_back(SkRef(paint.getCoverageFragment
Processor(i))); |
| 35 } | 35 } |
| 36 | 36 |
| 37 fXPFactory.reset(SkSafeRef(paint.getXPFactory())); | 37 fXPFactory.reset(SkSafeRef(paint.getXPFactory())); |
| 38 | 38 |
| 39 this->setState(GrPipelineBuilder::kHWAntialias_Flag, useHWAA); | 39 this->setState(GrPipelineBuilder::kHWAntialias_Flag, useHWAA); |
| 40 this->setState(GrPipelineBuilder::kDisableOutputConversionToSRGB_Flag, | 40 this->setState(GrPipelineBuilder::kDisableOutputConversionToSRGB_Flag, |
| 41 paint.getDisableOutputConversionToSRGB()); | 41 paint.getDisableOutputConversionToSRGB()); |
| 42 this->setState(GrPipelineBuilder::kAllowSRGBInputs_Flag, | 42 this->setState(GrPipelineBuilder::kAllowSRGBInputs_Flag, |
| 43 paint.getAllowSRGBInputs()); | 43 paint.getAllowSRGBInputs()); |
| 44 this->setState(GrPipelineBuilder::kUsesDistanceVectorField_Flag, | |
| 45 paint.usesDistanceVectorField()); | |
| 46 } | 44 } |
| 47 | 45 |
| 48 //////////////////////////////////////////////////////////////////////////////s | 46 //////////////////////////////////////////////////////////////////////////////s |
| 49 | 47 |
| 50 bool GrPipelineBuilder::willXPNeedDstTexture(const GrCaps& caps, | 48 bool GrPipelineBuilder::willXPNeedDstTexture(const GrCaps& caps, |
| 51 const GrPipelineOptimizations& opti
mizations) const { | 49 const GrPipelineOptimizations& opti
mizations) const { |
| 52 if (this->getXPFactory()) { | 50 if (this->getXPFactory()) { |
| 53 return this->getXPFactory()->willNeedDstTexture(caps, optimizations); | 51 return this->getXPFactory()->willNeedDstTexture(caps, optimizations); |
| 54 } | 52 } |
| 55 return GrPorterDuffXPFactory::SrcOverWillNeedDstTexture(caps, optimizations)
; | 53 return GrPorterDuffXPFactory::SrcOverWillNeedDstTexture(caps, optimizations)
; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 74 fCoverageEffectCnt = pipelineBuilder->numCoverageFragmentProcessors(); | 72 fCoverageEffectCnt = pipelineBuilder->numCoverageFragmentProcessors(); |
| 75 SkDEBUGCODE(++pipelineBuilder->fBlockEffectRemovalCnt;) | 73 SkDEBUGCODE(++pipelineBuilder->fBlockEffectRemovalCnt;) |
| 76 } | 74 } |
| 77 } | 75 } |
| 78 | 76 |
| 79 //////////////////////////////////////////////////////////////////////////////// | 77 //////////////////////////////////////////////////////////////////////////////// |
| 80 | 78 |
| 81 GrPipelineBuilder::~GrPipelineBuilder() { | 79 GrPipelineBuilder::~GrPipelineBuilder() { |
| 82 SkASSERT(0 == fBlockEffectRemovalCnt); | 80 SkASSERT(0 == fBlockEffectRemovalCnt); |
| 83 } | 81 } |
| OLD | NEW |