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 read the dst pixel color. | 105 * Checks whether the xp will need a copy of the destination to correctly bl
end. |
106 * TODO: remove when we have dstCpy contained inside of GrXP | |
107 */ | 106 */ |
108 bool willEffectReadDstColor() const; | 107 bool willXPNeedDstCopy(const GrDrawTargetCaps& caps) const; |
109 | 108 |
110 /** | 109 /** |
111 * The xfer processor factory. | 110 * The xfer processor factory. |
112 */ | 111 */ |
113 const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) { | 112 const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) { |
114 fXPFactory.reset(SkRef(xpFactory)); | 113 fXPFactory.reset(SkRef(xpFactory)); |
115 return xpFactory; | 114 return xpFactory; |
116 } | 115 } |
117 | 116 |
118 void setPorterDuffXPFactory(SkXfermode::Mode mode) { | 117 void setPorterDuffXPFactory(SkXfermode::Mode mode) { |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 mutable GrProcOptInfo fCoverageProcInfo; | 462 mutable GrProcOptInfo fCoverageProcInfo; |
464 mutable bool fColorProcInfoValid; | 463 mutable bool fColorProcInfoValid; |
465 mutable bool fCoverageProcInfoValid; | 464 mutable bool fCoverageProcInfoValid; |
466 mutable GrColor fColorCache; | 465 mutable GrColor fColorCache; |
467 mutable GrColor fCoverageCache; | 466 mutable GrColor fCoverageCache; |
468 | 467 |
469 friend class GrPipeline; | 468 friend class GrPipeline; |
470 }; | 469 }; |
471 | 470 |
472 #endif | 471 #endif |
OLD | NEW |