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:
mtklein 2015-02-12 15:24:51 -08:00 committed by Commit bot
parent 84b13dfde1
commit 71409c83e6
2 changed files with 2 additions and 21 deletions

View File

@ -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

View File

@ -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