| Index: src/core/SkPath.cpp
|
| diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
|
| index 8e9be855962aeb24b015178184c2fd0cfc483db8..694de2b1e74e678192f8b3d911874f8ff56c744f 100644
|
| --- a/src/core/SkPath.cpp
|
| +++ b/src/core/SkPath.cpp
|
| @@ -587,22 +587,19 @@ bool SkPath::isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts
|
| return result;
|
| }
|
|
|
| -bool SkPath::isRect(SkRect* rect) const {
|
| +bool SkPath::isRect(SkRect* rect, bool* isClosed, Direction* direction) const {
|
| SkDEBUGCODE(this->validate();)
|
| int currVerb = 0;
|
| const SkPoint* pts = fPathRef->points();
|
| - bool result = isRectContour(false, &currVerb, &pts, NULL, NULL);
|
| - if (result && rect) {
|
| - *rect = getBounds();
|
| + const SkPoint* first = pts;
|
| + if (!this->isRectContour(false, &currVerb, &pts, isClosed, direction)) {
|
| + return false;
|
| }
|
| - return result;
|
| -}
|
| -
|
| -bool SkPath::isRect(bool* isClosed, Direction* direction) const {
|
| - SkDEBUGCODE(this->validate();)
|
| - int currVerb = 0;
|
| - const SkPoint* pts = fPathRef->points();
|
| - return isRectContour(false, &currVerb, &pts, isClosed, direction);
|
| +
|
| + if (rect) {
|
| + rect->set(first, SkToS32(pts - first));
|
| + }
|
| + return true;
|
| }
|
|
|
| bool SkPath::isNestedRects(SkRect rects[2], Direction dirs[2]) const {
|
|
|