Index: src/gpu/GrPathRenderer.h |
diff --git a/src/gpu/GrPathRenderer.h b/src/gpu/GrPathRenderer.h |
index 3bc02306e63f7e8b83faf2313db5bf5ca8eda8b9..a7609db658d956e1b8de1dfa540c6f138d12d4e6 100644 |
--- a/src/gpu/GrPathRenderer.h |
+++ b/src/gpu/GrPathRenderer.h |
@@ -9,7 +9,6 @@ |
#define GrPathRenderer_DEFINED |
#include "GrDrawTarget.h" |
-#include "GrStencil.h" |
#include "GrStyle.h" |
#include "SkDrawProcs.h" |
@@ -82,7 +81,7 @@ public: |
bool fAntiAlias; |
// These next two are only used by GrStencilAndCoverPathRenderer |
- bool fIsStencilDisabled; |
+ bool fHasUserStencilSettings; |
bool fIsStencilBufferMSAA; |
void validate() const { |
@@ -155,11 +154,11 @@ public: |
canArgs.fStyle = args.fStyle; |
canArgs.fAntiAlias = args.fAntiAlias; |
- canArgs.fIsStencilDisabled = args.fPipelineBuilder->getStencil().isDisabled(); |
+ canArgs.fHasUserStencilSettings = args.fPipelineBuilder->hasUserStencilSettings(); |
canArgs.fIsStencilBufferMSAA = |
args.fPipelineBuilder->getRenderTarget()->isStencilBufferMultisampled(); |
SkASSERT(this->canDrawPath(canArgs)); |
- if (!args.fPipelineBuilder->getStencil().isDisabled()) { |
+ if (args.fPipelineBuilder->hasUserStencilSettings()) { |
SkASSERT(kNoRestriction_StencilSupport == this->getStencilSupport(*args.fPath)); |
SkASSERT(args.fStyle->isSimpleFill()); |
} |
@@ -260,14 +259,16 @@ private: |
* kStencilOnly in onGetStencilSupport(). |
*/ |
virtual void onStencilPath(const StencilPathArgs& args) { |
- static constexpr GrStencilSettings kIncrementStencil( |
- kReplace_StencilOp, |
- kReplace_StencilOp, |
- kAlways_StencilFunc, |
- 0xffff, |
- 0xffff, |
- 0xffff); |
- args.fPipelineBuilder->setStencil(kIncrementStencil); |
+ static constexpr GrUserStencilSettings kIncrementStencil( |
+ GrUserStencilSettings::StaticInit< |
+ 0xffff, |
+ GrUserStencilTest::kAlways, |
+ 0xffff, |
+ GrUserStencilOp::kReplace, |
+ GrUserStencilOp::kReplace, |
+ 0xffff>() |
+ ); |
+ args.fPipelineBuilder->setUserStencil(&kIncrementStencil); |
args.fPipelineBuilder->setDisableColorXPFactory(); |
DrawPathArgs drawArgs; |
drawArgs.fTarget = args.fTarget; |