Remove SkPath::asRect
AFAICT the asRect entry point is not needed.
Greg: GPU
Reed: API
Cary: Path
Review URL: https://codereview.chromium.org/833193002
diff --git a/src/core/SkClipStack.cpp b/src/core/SkClipStack.cpp
index d546287..515596a 100644
--- a/src/core/SkClipStack.cpp
+++ b/src/core/SkClipStack.cpp
@@ -112,8 +112,9 @@
void SkClipStack::Element::initPath(int saveCount, const SkPath& path, SkRegion::Op op,
bool doAA) {
if (!path.isInverseFillType()) {
- if (SkPath::kNone_PathAsRect != path.asRect()) {
- this->initRect(saveCount, path.getBounds(), op, doAA);
+ SkRect r;
+ if (path.isRect(&r)) {
+ this->initRect(saveCount, r, op, doAA);
return;
}
SkRect ovalRect;
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 9231d8b..128a0cf 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -526,14 +526,6 @@
return result;
}
-SkPath::PathAsRect SkPath::asRect(Direction* direction) const {
- SK_COMPILE_ASSERT(0 == kNone_PathAsRect, path_as_rect_mismatch);
- SK_COMPILE_ASSERT(1 == kFill_PathAsRect, path_as_rect_mismatch);
- SK_COMPILE_ASSERT(2 == kStroke_PathAsRect, path_as_rect_mismatch);
- bool isClosed = false;
- return (PathAsRect) (this->isRect(NULL, &isClosed, direction) + isClosed);
-}
-
bool SkPath::isRect(SkRect* rect, bool* isClosed, Direction* direction) const {
SkDEBUGCODE(this->validate();)
int currVerb = 0;