| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 /** | 148 /** |
| 149 * Installs a GrXPFactory. This object controls how src color, fractional pi
xel coverage, | 149 * Installs a GrXPFactory. This object controls how src color, fractional pi
xel coverage, |
| 150 * and the dst color are blended. | 150 * and the dst color are blended. |
| 151 */ | 151 */ |
| 152 const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) { | 152 const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) { |
| 153 fXPFactory.reset(SkSafeRef(xpFactory)); | 153 fXPFactory.reset(SkSafeRef(xpFactory)); |
| 154 return xpFactory; | 154 return xpFactory; |
| 155 } | 155 } |
| 156 | 156 |
| 157 /** | 157 /** |
| 158 * Sets a GrXPFactory that will ignore src color and perform a set operation
between the draws |
| 159 * output coverage and the destination. This is useful to render coverage ma
sks as CSG. |
| 160 */ |
| 161 void setCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage =
false) { |
| 162 fXPFactory.reset(GrCoverageSetOpXPFactory::Create(regionOp, invertCovera
ge)); |
| 163 } |
| 164 |
| 165 /** |
| 158 * Sets a GrXPFactory that disables color writes to the destination. This is
useful when | 166 * Sets a GrXPFactory that disables color writes to the destination. This is
useful when |
| 159 * rendering to the stencil buffer. | 167 * rendering to the stencil buffer. |
| 160 */ | 168 */ |
| 161 void setDisableColorXPFactory() { | 169 void setDisableColorXPFactory() { |
| 162 fXPFactory.reset(GrDisableColorXPFactory::Create()); | 170 fXPFactory.reset(GrDisableColorXPFactory::Create()); |
| 163 } | 171 } |
| 164 | 172 |
| 165 const GrXPFactory* getXPFactory() const { | 173 const GrXPFactory* getXPFactory() const { |
| 166 return fXPFactory; | 174 return fXPFactory; |
| 167 } | 175 } |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 mutable SkAutoTUnref<const GrXPFactory> fXPFactory; | 379 mutable SkAutoTUnref<const GrXPFactory> fXPFactory; |
| 372 FragmentProcessorArray fColorFragmentProcessors; | 380 FragmentProcessorArray fColorFragmentProcessors; |
| 373 FragmentProcessorArray fCoverageFragmentProcessors; | 381 FragmentProcessorArray fCoverageFragmentProcessors; |
| 374 GrClip fClip; | 382 GrClip fClip; |
| 375 | 383 |
| 376 friend class GrPipeline; | 384 friend class GrPipeline; |
| 377 friend class GrDrawTarget; | 385 friend class GrDrawTarget; |
| 378 }; | 386 }; |
| 379 | 387 |
| 380 #endif | 388 #endif |
| OLD | NEW |