remove contains(x,y) for rects and rrects ... not well defined, and unused
BUG=
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/51953003
git-svn-id: http://skia.googlecode.com/svn/trunk@12022 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 9df6285..8f79fbe 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -2961,14 +2961,17 @@
return dir;
}
+static bool contains_inclusive(const SkRect& r, SkScalar x, SkScalar y) {
+ return r.fLeft <= x && x <= r.fRight && r.fTop <= y && y <= r.fBottom;
+}
+
bool SkPath::contains(SkScalar x, SkScalar y) const {
bool isInverse = this->isInverseFillType();
if (this->isEmpty()) {
return isInverse;
}
- const SkRect& bounds = this->getBounds();
- if (!bounds.contains(x, y)) {
+ if (!contains_inclusive(this->getBounds(), x, y)) {
return isInverse;
}