| 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 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 // These have no equivalent in GrPaint, set them to defaults | 38 // These have no equivalent in GrPaint, set them to defaults |
| 39 fDrawFace = kBoth_DrawFace; | 39 fDrawFace = kBoth_DrawFace; |
| 40 fStencilSettings.setDisabled(); | 40 fStencilSettings.setDisabled(); |
| 41 fFlags = 0; | 41 fFlags = 0; |
| 42 | 42 |
| 43 fClip = clip; | 43 fClip = clip; |
| 44 | 44 |
| 45 this->setState(GrPipelineBuilder::kHWAntialias_Flag, | 45 this->setState(GrPipelineBuilder::kHWAntialias_Flag, |
| 46 rt->isUnifiedMultisampled() && paint.isAntiAlias()); | 46 rt->isUnifiedMultisampled() && paint.isAntiAlias()); |
| 47 this->setState(GrPipelineBuilder::kDisableOutputConversionToSRGB_Flag, |
| 48 paint.getDisableOutputConversionToSRGB()); |
| 47 } | 49 } |
| 48 | 50 |
| 49 //////////////////////////////////////////////////////////////////////////////s | 51 //////////////////////////////////////////////////////////////////////////////s |
| 50 | 52 |
| 51 bool GrPipelineBuilder::willXPNeedDstTexture(const GrCaps& caps, | 53 bool GrPipelineBuilder::willXPNeedDstTexture(const GrCaps& caps, |
| 52 const GrPipelineOptimizations& opti
mizations) const { | 54 const GrPipelineOptimizations& opti
mizations) const { |
| 53 if (this->getXPFactory()) { | 55 if (this->getXPFactory()) { |
| 54 return this->getXPFactory()->willNeedDstTexture(caps, optimizations, | 56 return this->getXPFactory()->willNeedDstTexture(caps, optimizations, |
| 55 this->hasMixedSamples())
; | 57 this->hasMixedSamples())
; |
| 56 } | 58 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 90 |
| 89 GrPipelineBuilder::~GrPipelineBuilder() { | 91 GrPipelineBuilder::~GrPipelineBuilder() { |
| 90 SkASSERT(0 == fBlockEffectRemovalCnt); | 92 SkASSERT(0 == fBlockEffectRemovalCnt); |
| 91 for (int i = 0; i < fColorFragmentProcessors.count(); ++i) { | 93 for (int i = 0; i < fColorFragmentProcessors.count(); ++i) { |
| 92 fColorFragmentProcessors[i]->unref(); | 94 fColorFragmentProcessors[i]->unref(); |
| 93 } | 95 } |
| 94 for (int i = 0; i < fCoverageFragmentProcessors.count(); ++i) { | 96 for (int i = 0; i < fCoverageFragmentProcessors.count(); ++i) { |
| 95 fCoverageFragmentProcessors[i]->unref(); | 97 fCoverageFragmentProcessors[i]->unref(); |
| 96 } | 98 } |
| 97 } | 99 } |
| OLD | NEW |