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

Unified Diff: src/core/SkCanvas.cpp

Issue 187553003: Clean up SkCanvas::clip* API (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 10 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 | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
===================================================================
--- src/core/SkCanvas.cpp (revision 13676)
+++ src/core/SkCanvas.cpp (working copy)
@@ -1165,10 +1165,9 @@
//////////////////////////////////////////////////////////////////////////////
-bool SkCanvas::clipRect(const SkRect& rect, SkRegion::Op op, bool doAA) {
+void SkCanvas::clipRect(const SkRect& rect, SkRegion::Op op, bool doAA) {
ClipEdgeStyle edgeStyle = doAA ? kSoft_ClipEdgeStyle : kHard_ClipEdgeStyle;
this->onClipRect(rect, op, edgeStyle);
- return !this->isClipEmpty();
}
void SkCanvas::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle) {
@@ -1258,14 +1257,13 @@
}
}
-bool SkCanvas::clipRRect(const SkRRect& rrect, SkRegion::Op op, bool doAA) {
+void SkCanvas::clipRRect(const SkRRect& rrect, SkRegion::Op op, bool doAA) {
ClipEdgeStyle edgeStyle = doAA ? kSoft_ClipEdgeStyle : kHard_ClipEdgeStyle;
if (rrect.isRect()) {
this->onClipRect(rrect.getBounds(), op, edgeStyle);
} else {
this->onClipRRect(rrect, op, edgeStyle);
}
- return !this->isClipEmpty();
}
void SkCanvas::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeStyle) {
@@ -1294,7 +1292,7 @@
this->SkCanvas::onClipPath(path, op, edgeStyle);
}
-bool SkCanvas::clipPath(const SkPath& path, SkRegion::Op op, bool doAA) {
+void SkCanvas::clipPath(const SkPath& path, SkRegion::Op op, bool doAA) {
ClipEdgeStyle edgeStyle = doAA ? kSoft_ClipEdgeStyle : kHard_ClipEdgeStyle;
SkRect r;
if (!path.isInverseFillType() && path.isRect(&r)) {
@@ -1302,8 +1300,6 @@
} else {
this->onClipPath(path, op, edgeStyle);
}
-
- return !this->isClipEmpty();
}
void SkCanvas::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle) {
@@ -1379,7 +1375,7 @@
clip_path_helper(this, fMCRec->fRasterClip, devPath, op, edgeStyle);
}
-bool SkCanvas::updateClipConservativelyUsingBounds(const SkRect& bounds, SkRegion::Op op,
+void SkCanvas::updateClipConservativelyUsingBounds(const SkRect& bounds, SkRegion::Op op,
bool inverseFilled) {
// This is for updating the clip conservatively using only bounds
// information.
@@ -1452,13 +1448,10 @@
SkASSERT(0); // unhandled op?
}
}
-
- return !this->isClipEmpty();
}
-bool SkCanvas::clipRegion(const SkRegion& rgn, SkRegion::Op op) {
+void SkCanvas::clipRegion(const SkRegion& rgn, SkRegion::Op op) {
this->onClipRegion(rgn, op);
- return !this->isClipEmpty();
}
void SkCanvas::onClipRegion(const SkRegion& rgn, SkRegion::Op op) {
« no previous file with comments | « include/core/SkCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698