diff options
Diffstat (limited to 'src/core/SkPath.cpp')
-rw-r--r-- | src/core/SkPath.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index 4b3505a160..7f58ae347e 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -121,6 +121,7 @@ SkPath::SkPath() fLastMoveToIndex = INITIAL_LASTMOVETOINDEX_VALUE; #ifdef SK_BUILD_FOR_ANDROID fGenerationID = 0; + fSourcePath = NULL; #endif } @@ -129,7 +130,8 @@ SkPath::SkPath(const SkPath& src) { *this = src; #ifdef SK_BUILD_FOR_ANDROID // the assignment operator above increments the ID so correct for that here - fGenerationID--; + fGenerationID = src.fGenerationID; + fSourcePath = NULL; #endif } @@ -188,6 +190,14 @@ void SkPath::swap(SkPath& other) { uint32_t SkPath::getGenerationID() const { return fGenerationID; } + +const SkPath* SkPath::getSourcePath() const { + return fSourcePath; +} + +void SkPath::setSourcePath(const SkPath* path) { + fSourcePath = path; +} #endif void SkPath::reset() { @@ -2030,7 +2040,7 @@ bool SkPath::cheapComputeDirection(Direction* dir) const { if (n < 3) { continue; } - + const SkPoint* pts = iter.pts(); SkScalar cross = 0; if (kConvex_Convexity == conv) { |