| Index: src/pathops/SkOpBuilder.cpp
|
| diff --git a/src/pathops/SkOpBuilder.cpp b/src/pathops/SkOpBuilder.cpp
|
| index 075520d2c1a42b195a4689ee7d614abb8bdc7d88..011d6a6aba0fb0f344e14d9e5b2e3539a8c0dbc2 100644
|
| --- a/src/pathops/SkOpBuilder.cpp
|
| +++ b/src/pathops/SkOpBuilder.cpp
|
| @@ -25,17 +25,7 @@
|
| return true;
|
| }
|
|
|
| -void SkOpBuilder::ReversePath(SkPath* path) {
|
| - SkPath temp;
|
| - SkPoint lastPt;
|
| - SkAssertResult(path->getLastPt(&lastPt));
|
| - temp.moveTo(lastPt);
|
| - temp.reversePathTo(*path);
|
| - temp.close();
|
| - *path = temp;
|
| -}
|
| -
|
| -bool SkOpBuilder::FixWinding(SkPath* path) {
|
| +bool FixWinding(SkPath* path) {
|
| SkPath::FillType fillType = path->getFillType();
|
| if (fillType == SkPath::kInverseEvenOdd_FillType) {
|
| fillType = SkPath::kInverseWinding_FillType;
|
| @@ -45,7 +35,9 @@
|
| SkPathPriv::FirstDirection dir;
|
| if (one_contour(*path) && SkPathPriv::CheapComputeFirstDirection(*path, &dir)) {
|
| if (dir != SkPathPriv::kCCW_FirstDirection) {
|
| - ReversePath(path);
|
| + SkPath temp;
|
| + temp.reverseAddPath(*path);
|
| + *path = temp;
|
| }
|
| path->setFillType(fillType);
|
| return true;
|
| @@ -141,7 +133,9 @@
|
| if (firstDir == SkPathPriv::kUnknown_FirstDirection) {
|
| firstDir = dir;
|
| } else if (firstDir != dir) {
|
| - ReversePath(test);
|
| + SkPath temp;
|
| + temp.reverseAddPath(*test);
|
| + *test = temp;
|
| }
|
| continue;
|
| }
|
|
|