Index: src/gpu/GrUserStencilSettings.h |
diff --git a/src/gpu/GrUserStencilSettings.h b/src/gpu/GrUserStencilSettings.h |
index 18002591eca6267e2b513f2d9cfad6614a6546e3..3cbadfd3b3f3d4a77a5ec77c9819d022c44466ad 100644 |
--- a/src/gpu/GrUserStencilSettings.h |
+++ b/src/gpu/GrUserStencilSettings.h |
@@ -182,6 +182,22 @@ struct GrUserStencilSettings { |
GrUserStencilSettings() = delete; |
GrUserStencilSettings(const GrUserStencilSettings&) = delete; |
+ uint16_t flags(bool hasStencilClip) const { |
+ return fFrontFlags[hasStencilClip] & fBackFlags[hasStencilClip]; |
+ } |
+ bool isDisabled(bool hasStencilClip) const { |
+ return this->flags(hasStencilClip) & kDisabled_StencilFlag; |
+ } |
+ bool doesWrite(bool hasStencilClip) const { |
+ return !(this->flags(hasStencilClip) & kNoModifyStencil_StencilFlag); |
+ } |
+ bool isTwoSided(bool hasStencilClip) const { |
+ return !(this->flags(hasStencilClip) & kSingleSided_StencilFlag); |
+ } |
+ bool usesWrapOp(bool hasStencilClip) const { |
+ return !(this->flags(hasStencilClip) & kNoWrapOps_StencilFlag); |
+ } |
+ |
const uint16_t fFrontFlags[2]; // frontFlagsForDraw = fFrontFlags[hasStencilClip]. |
const Face fFront; |
const uint16_t fBackFlags[2]; // backFlagsForDraw = fBackFlags[hasStencilClip]. |