aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-02-12 15:24:51 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-12 15:24:51 -0800
commit71409c83e69b387b3c5d567197d0421c36baf68d (patch)
tree8bca435d23ceb484604cf4cb5af3cdb4d4a40e8e
parent84b13dfde15b7ab45b44a33384e803c7a9fd0326 (diff)
I cannot remember what the race here actually was.
Removing SkTRacy will show us, or perhaps show us we already fixed the race. BUG=chromium:437511 No public API changes. TBR=reed@google.com Review URL: https://codereview.chromium.org/922873002
-rw-r--r--include/core/SkDynamicAnnotations.h19
-rw-r--r--include/core/SkPixelRef.h4
2 files changed, 2 insertions, 21 deletions
diff --git a/include/core/SkDynamicAnnotations.h b/include/core/SkDynamicAnnotations.h
index e7710307f5..108dd10f9c 100644
--- a/include/core/SkDynamicAnnotations.h
+++ b/include/core/SkDynamicAnnotations.h
@@ -66,23 +66,4 @@ void SK_ANNOTATE_BENIGN_RACE(T* ptr) {
#endif
-// Can be used to wrap values that are intentionally racy, usually small mutable cached values, e.g.
-// - SkMatrix type mask
-// - SkPixelRef genIDs
-template <typename T>
-class SkTRacy {
-public:
- operator const T() const {
- return SK_ANNOTATE_UNPROTECTED_READ(fVal);
- }
-
- SkTRacy& operator=(const T& val) {
- SK_ANNOTATE_UNPROTECTED_WRITE(&fVal, val);
- return *this;
- }
-
-private:
- T fVal;
-};
-
#endif//SkDynamicAnnotations_DEFINED
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h
index 2a5e7ecbdc..9b98ebdf10 100644
--- a/include/core/SkPixelRef.h
+++ b/include/core/SkPixelRef.h
@@ -353,8 +353,8 @@ private:
LockRec fRec;
int fLockCount;
- mutable SkTRacy<uint32_t> fGenerationID;
- mutable SkTRacy<bool> fUniqueGenerationID;
+ mutable uint32_t fGenerationID;
+ mutable bool fUniqueGenerationID;
#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
const uint32_t fStableID;
#endif