Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1665)

Unified Diff: include/core/SkCanvas.h

Issue 2357333002: allow clip calls w/o op param, remove unnecessary kReplace ops (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/skbug1719.cpp ('k') | samplecode/SampleClipDrawMatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index acb52c9e2eecea5f222d84be2563c73fe5cdcae1..7bf84c978fed4aa0d549c4c29ab94b3f19084aa6 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
« no previous file with comments | « gm/skbug1719.cpp ('k') | samplecode/SampleClipDrawMatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698