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

Unified Diff: include/core/SkRefCnt.h

Issue 752263002: make SkRefCnt::getRefCnt() debug-only, remove it from SkNVRefCnt. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: typos Created 6 years, 1 month 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 | « no previous file | tests/MetaDataTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkRefCnt.h
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index d85c20ecaf0638c233f38810ceb5581001208b77..7ccfbf9d70632798321778e1a3382fa3e7aadf79 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -42,8 +42,10 @@ public:
#endif
}
+#ifdef SK_DEBUG
/** Return the reference count. Use only for debugging. */
int32_t getRefCnt() const { return fRefCnt; }
+#endif
/** May return true if the caller is the only owner.
* Ensures that all previous owner's actions are complete.
@@ -269,7 +271,6 @@ public:
}
}
void deref() const { this->unref(); } // Chrome prefers to call deref().
- int32_t getRefCnt() const { return fRefCnt; } // Used by Chrome unit tests.
protected:
#ifdef SK_DEBUG
« no previous file with comments | « no previous file | tests/MetaDataTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698