diff options
author | 2013-06-26 15:53:29 +0000 | |
---|---|---|
committer | 2013-06-26 15:53:29 +0000 | |
commit | dd68f4533b6ba7310ebec82e2442efb00c583e73 (patch) | |
tree | e0951c69721e41070e60a3c7b70fd4e711487650 | |
parent | 172339dd186ddc5f2466fcfb993c2a4b06034050 (diff) |
Fix PathRefDebugRef (SK_DEBUG_PATH_REF) case for SkPath copy constructor.
Review URL: https://codereview.chromium.org/17902003
git-svn-id: http://skia.googlecode.com/svn/trunk@9768 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | include/core/SkPath.h | 1 | ||||
-rw-r--r-- | src/core/SkPath.cpp | 9 |
2 files changed, 4 insertions, 6 deletions
diff --git a/include/core/SkPath.h b/include/core/SkPath.h index 2488dd8bf9..4e2451b5e0 100644 --- a/include/core/SkPath.h +++ b/include/core/SkPath.h @@ -951,7 +951,6 @@ public: of SkPathRefs */ class PathRefDebugRef { public: - PathRefDebugRef(SkPath* owner); PathRefDebugRef(SkPathRef* pr, SkPath* owner); ~PathRefDebugRef(); void reset(SkPathRef* ref); diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index e997b80e4f..7497ab2591 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -19,11 +19,10 @@ #if SK_DEBUG_PATH_REF -SkPath::PathRefDebugRef::PathRefDebugRef(SkPath* owner) : fOwner(owner) {} - SkPath::PathRefDebugRef::PathRefDebugRef(SkPathRef* pr, SkPath* owner) -: fPathRef(pr) -, fOwner(owner) { + : fPathRef(pr) + , fOwner(owner) +{ pr->addOwner(owner); } @@ -244,7 +243,7 @@ void SkPath::resetFields() { SkPath::SkPath(const SkPath& that) #if SK_DEBUG_PATH_REF - : fPathRef(this) + : fPathRef(SkRef(that.fPathRef.get()), this) #else : fPathRef(SkRef(that.fPathRef.get())) #endif |