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

Unified Diff: skia/config/sk_ref_cnt_ext_debug.h

Issue 1500033003: Revert of Fix TSAN error in skia/chromium ref count debug checks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/config/sk_ref_cnt_ext_debug.h
diff --git a/skia/config/sk_ref_cnt_ext_debug.h b/skia/config/sk_ref_cnt_ext_debug.h
index 1ca58ad0a586943c6f3d932fd55878871b0f9527..b2b66adba729b8110d5b285c7e30cabfaa1af426 100644
--- a/skia/config/sk_ref_cnt_ext_debug.h
+++ b/skia/config/sk_ref_cnt_ext_debug.h
@@ -9,24 +9,21 @@
#error Only one SkRefCnt should be used.
#endif
-#include <atomic>
-
// Alternate implementation of SkRefCnt for Chromium debug builds
class SK_API SkRefCnt : public SkRefCntBase {
public:
SkRefCnt() : flags_(0) {}
- void ref() const { SkASSERT(flags_.load() != AdoptionRequired_Flag); SkRefCntBase::ref(); }
+ void ref() const { SkASSERT(flags_ != AdoptionRequired_Flag); SkRefCntBase::ref(); }
void adopted() const { flags_ |= Adopted_Flag; }
void requireAdoption() const { flags_ |= AdoptionRequired_Flag; }
void deref() const { SkRefCntBase::unref(); }
private:
-
enum {
Adopted_Flag = 0x1,
AdoptionRequired_Flag = 0x2,
};
- mutable std::atomic<int> flags_;
+ mutable int flags_;
};
// Bootstrap for Blink's WTF::RefPtr
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698