diff options
author | 2013-06-27 18:39:39 +0000 | |
---|---|---|
committer | 2013-06-27 18:39:39 +0000 | |
commit | f48e4755282d3d185f42fd2dd964d4bbd9887ee4 (patch) | |
tree | 5799389db8b1f3b8348e6d96e0d132b62e56ea5e /src/core/SkPath.cpp | |
parent | db54dd3f5e8e96d36ba4ed1a80bd0e0a32804a4b (diff) |
Remove SK_DEBUG_PATH_REF
R=bungeman@google.com
Author: bsalomon@google.com
Review URL: https://chromiumcodereview.appspot.com/18029006
git-svn-id: http://skia.googlecode.com/svn/trunk@9795 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkPath.cpp')
-rw-r--r-- | src/core/SkPath.cpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index 7497ab2591..4ff62878b9 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 |