Index: include/core/SkDynamicAnnotations.h |
diff --git a/include/core/SkDynamicAnnotations.h b/include/core/SkDynamicAnnotations.h |
index e7710307f5532589a09b1f56d9b976cfdc373de7..86b01814a8f38ba005c0ac6105150c492573a87a 100644 |
--- a/include/core/SkDynamicAnnotations.h |
+++ b/include/core/SkDynamicAnnotations.h |
@@ -23,8 +23,6 @@ void AnnotateIgnoreReadsBegin(const char* file, int line); |
void AnnotateIgnoreReadsEnd(const char* file, int line); |
void AnnotateIgnoreWritesBegin(const char* file, int line); |
void AnnotateIgnoreWritesEnd(const char* file, int line); |
-void AnnotateBenignRaceSized(const char* file, int line, |
- const volatile void* addr, long size, const char* desc); |
} // extern "C" |
// SK_ANNOTATE_UNPROTECTED_READ can wrap any variable read to tell TSAN to ignore that it appears to |
@@ -51,38 +49,11 @@ inline void SK_ANNOTATE_UNPROTECTED_WRITE(T* ptr, const T& val) { |
AnnotateIgnoreWritesEnd(__FILE__, __LINE__); |
} |
-// Ignore racy reads and racy writes to this pointer, indefinitely. |
-// If at all possible, use the more precise SK_ANNOTATE_UNPROTECTED_READ. |
-template <typename T> |
-void SK_ANNOTATE_BENIGN_RACE(T* ptr) { |
- AnnotateBenignRaceSized(__FILE__, __LINE__, ptr, sizeof(*ptr), "SK_ANNOTATE_BENIGN_RACE"); |
-} |
- |
#else // !DYNAMIC_ANNOTATIONS_ENABLED |
#define SK_ANNOTATE_UNPROTECTED_READ(x) (x) |
#define SK_ANNOTATE_UNPROTECTED_WRITE(ptr, val) *(ptr) = (val) |
-#define SK_ANNOTATE_BENIGN_RACE(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 |