Index: src/gpu/GrStencil.h |
diff --git a/src/gpu/GrStencil.h b/src/gpu/GrStencil.h |
index d94a45fad2bef6e6cc0a7416c511b68b74fc05f4..28042b0b2eb95ef6ad900c1bc0f6c03f3e3aa0a8 100644 |
--- a/src/gpu/GrStencil.h |
+++ b/src/gpu/GrStencil.h |
@@ -277,10 +277,14 @@ public: |
void invalidate() { |
// write an illegal value to the first member |
- fPassOps[0] = (GrStencilOp)(uint8_t)-1; |
+ fPassOps[0] = kStencilOpCount; |
fFlags = 0; |
} |
+ bool isValid() const { |
+ return fPassOps[0] < kStencilOpCount; |
+ } |
+ |
bool operator == (const GrStencilSettings& s) const { |
static const size_t gCompareSize = sizeof(GrStencilSettings) - |
sizeof(fFlags); |