diff options
author | 2014-11-06 12:57:13 -0800 | |
---|---|---|
committer | 2014-11-06 12:57:13 -0800 | |
commit | 2c93efeb6f2dd652eb2575c04124d82952f020c7 (patch) | |
tree | bca7bf2584494be08b4e2e0905a39709c436b424 /src/gpu/GrClipMaskManager.h | |
parent | 2ecf86e55ecb893cf4d04e16a4ac5b0de6dcf173 (diff) |
Clip in grdrawtarget
NOTREECHECKS=true
BUG=skia:
Review URL: https://codereview.chromium.org/685883003
Diffstat (limited to 'src/gpu/GrClipMaskManager.h')
-rw-r--r-- | src/gpu/GrClipMaskManager.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h index 20b7fdc077..cde718a605 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; }; |