Index: src/gpu/GrClipMaskManager.h |
diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h |
index 20b7fdc0778ec923b669d4e74822dc9645b0cafd..cde718a605ceb760b617a4a2bac922adc6a56e78 100644 |
--- a/src/gpu/GrClipMaskManager.h |
+++ b/src/gpu/GrClipMaskManager.h |
@@ -50,6 +50,11 @@ public: |
struct ScissorState { |
ScissorState() : fEnabled(false) {} |
void set(const SkIRect& rect) { fRect = rect; fEnabled = true; } |
+ bool operator==(const ScissorState& other) { |
+ return fEnabled == other.fEnabled && |
+ (false == fEnabled || fRect == other.fRect); |
+ } |
+ bool operator!=(const ScissorState& other) { return !(*this == other); } |
bool fEnabled; |
SkIRect fRect; |
}; |