aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2016-11-07 05:09:28 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-11-07 05:09:28 -0800
commit51c5678f258736736c4a5d48d4e82c73be225428 (patch)
treefd9c8b36f3e4d384e881e608835b107f4613d281 /include
parentad512797c9405f78b080a1d24cd98f465b9879dd (diff)
use reversePathTo in place of addPathReverse
Path ops was using addPathReverse, instead of reversePathTo. The former adds a moveTo always, and the latter requires that the caller add the moveTo if needed. Simplify the reversePathTo implementation. R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2481463002 Committed: https://skia.googlesource.com/skia/+/d8db392be9dd1887df04b10b5670991d6b098c17 Review-Url: https://codereview.chromium.org/2481463002
Diffstat (limited to 'include')
-rw-r--r--include/core/SkPath.h2
-rw-r--r--include/pathops/SkPathOps.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/core/SkPath.h b/include/core/SkPath.h
index 46cb15c785..36dfdfefa6 100644
--- a/include/core/SkPath.h
+++ b/include/core/SkPath.h
@@ -1190,6 +1190,8 @@ private:
friend class SkAutoPathBoundsUpdate;
friend class SkAutoDisableOvalCheck;
friend class SkAutoDisableDirectionCheck;
+ friend class SkPathWriter;
+ friend class SkOpBuilder;
friend class SkBench_AddPathTest; // perf test reversePathTo
friend class PathTest_Private; // unit test reversePathTo
friend class ForceIsRRect_Private; // unit test isRRect
diff --git a/include/pathops/SkPathOps.h b/include/pathops/SkPathOps.h
index fa01788394..1e8093f2a8 100644
--- a/include/pathops/SkPathOps.h
+++ b/include/pathops/SkPathOps.h
@@ -91,6 +91,8 @@ private:
SkTArray<SkPath> fPathRefs;
SkTDArray<SkPathOp> fOps;
+ static bool FixWinding(SkPath* path);
+ static void ReversePath(SkPath* path);
void reset();
};