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
This commit is contained in:
parent
84b13dfde1
commit
71409c83e6
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user