Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(711)

Unified Diff: src/core/SkPath.cpp

Issue 17902003: Fix PathRefDebugRef (SK_DEBUG_PATH_REF) case for SkPath copy constructor. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkPath.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPath.cpp
===================================================================
--- src/core/SkPath.cpp (revision 9750)
+++ src/core/SkPath.cpp (working copy)
@@ -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 @@
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
« no previous file with comments | « include/core/SkPath.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698