aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkRefCnt.h
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2016-10-12 11:04:25 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-10-12 18:20:48 +0000
commit81f4b0d1e0f5d1244dc5018f59542070bd309b97 (patch)
treeff4fa6782f9c6ea9ae99e19b456ac97bfad960df /include/core/SkRefCnt.h
parent96b333a9a1b6a367d6c542118638e3108d8ed23b (diff)
Remove hack allowing fRefCnt of 0.
In some legacy situations users of SkRefCnt subclasses were keeping the objects alive with a reference count of 0. Now that these users are cleaned up, remove the hack which allowed such code to keep functioning. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3264 Change-Id: I22f63d87b6d995cad6326998284930ad9eaa2983 Reviewed-on: https://skia-review.googlesource.com/3264 Reviewed-by: Derek Sollenberger <djsollen@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'include/core/SkRefCnt.h')
-rw-r--r--include/core/SkRefCnt.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index 82a3c9e000..a502d4ef17 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -71,15 +71,7 @@ public:
/** Increment the reference count. Must be balanced by a call to unref().
*/
void ref() const {
-#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
- // Android employs some special subclasses that enable the fRefCnt to
- // go to zero, but not below, prior to reusing the object. This breaks
- // the use of unique() on such objects and as such should be removed
- // once the Android code is fixed.
- SkASSERT(getRefCnt() >= 0);
-#else
SkASSERT(getRefCnt() > 0);
-#endif
// No barrier required.
(void)fRefCnt.fetch_add(+1, std::memory_order_relaxed);
}