aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-09-21 11:15:07 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-21 11:15:07 -0700
commit669983856d99b9312be3166b7dd1f8483a90c315 (patch)
treea0a65286af33fae8a77e0d5e8a06f064bb656575 /include
parentdf55827ae6291e44d4da54bdcbb8505538b3c54d (diff)
allow clip calls w/o op param, remove unnecessary kReplace ops
Diffstat (limited to 'include')
-rw-r--r--include/core/SkCanvas.h24
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