diff options
author | reed <reed@google.com> | 2016-09-21 11:15:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-21 11:15:07 -0700 |
commit | 669983856d99b9312be3166b7dd1f8483a90c315 (patch) | |
tree | a0a65286af33fae8a77e0d5e8a06f064bb656575 /include | |
parent | df55827ae6291e44d4da54bdcbb8505538b3c54d (diff) |
allow clip calls w/o op param, remove unnecessary kReplace ops
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357333002
Review-Url: https://codereview.chromium.org/2357333002
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkCanvas.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index acb52c9e2e..7bf84c978f 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -499,7 +499,13 @@ public: * @param op The region op to apply to the current clip * @param doAntiAlias true if the clip should be antialiased */ - void clipRect(const SkRect& rect, ClipOp op = kIntersect_Op, bool doAntiAlias = false); + void clipRect(const SkRect& rect, ClipOp, bool doAntiAlias); + void clipRect(const SkRect& rect, ClipOp op) { + this->clipRect(rect, op, false); + } + void clipRect(const SkRect& rect, bool doAntiAlias = false) { + this->clipRect(rect, kIntersect_Op, doAntiAlias); + } /** * Modify the current clip with the specified SkRRect. @@ -507,7 +513,13 @@ public: * @param op The region op to apply to the current clip * @param doAntiAlias true if the clip should be antialiased */ - void clipRRect(const SkRRect& rrect, ClipOp op = kIntersect_Op, bool doAntiAlias = false); + void clipRRect(const SkRRect& rrect, ClipOp op, bool doAntiAlias); + void clipRRect(const SkRRect& rrect, ClipOp op) { + this->clipRRect(rrect, op, false); + } + void clipRRect(const SkRRect& rrect, bool doAntiAlias = false) { + this->clipRRect(rrect, kIntersect_Op, doAntiAlias); + } /** * Modify the current clip with the specified path. @@ -515,7 +527,13 @@ public: * @param op The region op to apply to the current clip * @param doAntiAlias true if the clip should be antialiased */ - void clipPath(const SkPath& path, ClipOp op = kIntersect_Op, bool doAntiAlias = false); + void clipPath(const SkPath& path, ClipOp op, bool doAntiAlias); + void clipPath(const SkPath& path, ClipOp op) { + this->clipPath(path, op, false); + } + void clipPath(const SkPath& path, bool doAntiAlias = false) { + this->clipPath(path, kIntersect_Op, doAntiAlias); + } /** EXPERIMENTAL -- only used for testing Set to false to force clips to be hard, even if doAntiAlias=true is |