| 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 #ifndef GrPipelineBuilder_DEFINED | 8 #ifndef GrPipelineBuilder_DEFINED |
| 9 #define GrPipelineBuilder_DEFINED | 9 #define GrPipelineBuilder_DEFINED |
| 10 | 10 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 if (!fXPFactory) { | 95 if (!fXPFactory) { |
| 96 fXPFactory.reset(GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode
)); | 96 fXPFactory.reset(GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode
)); |
| 97 } | 97 } |
| 98 return fXPFactory.get(); | 98 return fXPFactory.get(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 const GrFragmentStage& getColorStage(int idx) const { return fColorStages[id
x]; } | 101 const GrFragmentStage& getColorStage(int idx) const { return fColorStages[id
x]; } |
| 102 const GrFragmentStage& getCoverageStage(int idx) const { return fCoverageSta
ges[idx]; } | 102 const GrFragmentStage& getCoverageStage(int idx) const { return fCoverageSta
ges[idx]; } |
| 103 | 103 |
| 104 /** | 104 /** |
| 105 * Checks whether the xp will need a copy of the destination to correctly bl
end. | 105 * Checks whether the xp will read the dst pixel color. |
| 106 * TODO: remove when we have dstCpy contained inside of GrXP |
| 106 */ | 107 */ |
| 107 bool willXPNeedDstCopy(const GrDrawTargetCaps& caps) const; | 108 bool willEffectReadDstColor() const; |
| 108 | 109 |
| 109 /** | 110 /** |
| 110 * The xfer processor factory. | 111 * The xfer processor factory. |
| 111 */ | 112 */ |
| 112 const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) { | 113 const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) { |
| 113 fXPFactory.reset(SkRef(xpFactory)); | 114 fXPFactory.reset(SkRef(xpFactory)); |
| 114 return xpFactory; | 115 return xpFactory; |
| 115 } | 116 } |
| 116 | 117 |
| 117 void setPorterDuffXPFactory(SkXfermode::Mode mode) { | 118 void setPorterDuffXPFactory(SkXfermode::Mode mode) { |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 mutable GrProcOptInfo fCoverageProcInfo; | 463 mutable GrProcOptInfo fCoverageProcInfo; |
| 463 mutable bool fColorProcInfoValid; | 464 mutable bool fColorProcInfoValid; |
| 464 mutable bool fCoverageProcInfoValid; | 465 mutable bool fCoverageProcInfoValid; |
| 465 mutable GrColor fColorCache; | 466 mutable GrColor fColorCache; |
| 466 mutable GrColor fCoverageCache; | 467 mutable GrColor fCoverageCache; |
| 467 | 468 |
| 468 friend class GrPipeline; | 469 friend class GrPipeline; |
| 469 }; | 470 }; |
| 470 | 471 |
| 471 #endif | 472 #endif |
| OLD | NEW |