Index: src/core/SkPath.cpp |
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp |
index 7497ab2591a787bb42c6c87b9f516e2bce2a4859..4ff62878b9d94d7ec6ce0415ca15033e9d603700 100644 |
--- a/src/core/SkPath.cpp |
+++ b/src/core/SkPath.cpp |
@@ -15,59 +15,6 @@ |
#include "SkRRect.h" |
#include "SkThread.h" |
-//////////////////////////////////////////////////////////////////////////// |
- |
-#if SK_DEBUG_PATH_REF |
- |
-SkPath::PathRefDebugRef::PathRefDebugRef(SkPathRef* pr, SkPath* owner) |
- : fPathRef(pr) |
- , fOwner(owner) |
-{ |
- pr->addOwner(owner); |
-} |
- |
-SkPath::PathRefDebugRef::~PathRefDebugRef() { |
- fPathRef->removeOwner(fOwner); |
-} |
- |
-void SkPath::PathRefDebugRef::reset(SkPathRef* ref) { |
- bool diff = (ref != fPathRef.get()); |
- if (diff && NULL != fPathRef.get()) { |
- fPathRef.get()->removeOwner(fOwner); |
- } |
- fPathRef.reset(ref); |
- if (diff && NULL != fPathRef.get()) { |
- fPathRef.get()->addOwner(fOwner); |
- } |
-} |
- |
-void SkPath::PathRefDebugRef::swap(SkPath::PathRefDebugRef* other) { |
- if (other->fPathRef.get() != fPathRef.get()) { |
- other->fPathRef->removeOwner(other->fOwner); |
- other->fPathRef->addOwner(fOwner); |
- |
- fPathRef->removeOwner(fOwner); |
- fPathRef->addOwner(other->fOwner); |
- } |
- |
- fPathRef.swap(&other->fPathRef); |
-} |
- |
-SkPathRef* SkPath::PathRefDebugRef::get() const { return fPathRef.get(); } |
- |
-SkAutoTUnref<SkPathRef>::BlockRefType *SkPath::PathRefDebugRef::operator->() const { |
- return fPathRef.operator->(); |
-} |
- |
-SkPath::PathRefDebugRef::operator SkPathRef*() { |
- return fPathRef.operator SkPathRef *(); |
-} |
- |
-#endif |
- |
-//////////////////////////////////////////////////////////////////////////// |
- |
- |
SK_DEFINE_INST_COUNT(SkPath); |
// This value is just made-up for now. When count is 4, calling memset was much |
@@ -213,11 +160,7 @@ static bool compute_pt_bounds(SkRect* bounds, const SkPathRef& ref) { |
#define INITIAL_LASTMOVETOINDEX_VALUE ~0 |
SkPath::SkPath() |
-#if SK_DEBUG_PATH_REF |
- : fPathRef(SkPathRef::CreateEmpty(), this) |
-#else |
: fPathRef(SkPathRef::CreateEmpty()) |
-#endif |
#ifdef SK_BUILD_FOR_ANDROID |
, fGenerationID(0) |
#endif |
@@ -242,11 +185,7 @@ void SkPath::resetFields() { |
} |
SkPath::SkPath(const SkPath& that) |
-#if SK_DEBUG_PATH_REF |
- : fPathRef(SkRef(that.fPathRef.get()), this) |
-#else |
: fPathRef(SkRef(that.fPathRef.get())) |
-#endif |
#ifdef SK_BUILD_FOR_ANDROID |
, fGenerationID(0) |
#endif |