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

Unified Diff: src/core/SkRRect.cpp

Issue 51953003: remove contains(x,y) for rects and rrects ... not well defined, and unused (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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
Index: src/core/SkRRect.cpp
diff --git a/src/core/SkRRect.cpp b/src/core/SkRRect.cpp
index 75af106b7b6eaf81183ce1b977afa27231577aa3..e3d11cb01efb294221315a9b2879f17332e0da7a 100644
--- a/src/core/SkRRect.cpp
+++ b/src/core/SkRRect.cpp
@@ -116,27 +116,6 @@ void SkRRect::setRectRadii(const SkRect& rect, const SkVector radii[4]) {
SkDEBUGCODE(this->validate();)
}
-bool SkRRect::contains(SkScalar x, SkScalar y) const {
- SkDEBUGCODE(this->validate();)
-
- if (kEmpty_Type == this->type()) {
- return false;
- }
-
- if (!fRect.contains(x, y)) {
- return false;
- }
-
- if (kRect_Type == this->type()) {
- // the 'fRect' test above was sufficient
- return true;
- }
-
- // We know the point is inside the RR's bounds. The only way it can
- // be out is if it outside one of the corners
- return checkCornerContainment(x, y);
-}
-
// This method determines if a point known to be inside the RRect's bounds is
// inside all the corners.
bool SkRRect::checkCornerContainment(SkScalar x, SkScalar y) const {
« src/core/SkPath.cpp ('K') | « src/core/SkPath.cpp ('k') | tests/RoundRectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698