Index: src/core/SkPixelRef.cpp |
diff --git a/src/core/SkPixelRef.cpp b/src/core/SkPixelRef.cpp |
index 560748c463c99dfa84cea4857085c6ff392261b8..24ee4733cb47d1b4594d8744c4d3550521a75900 100644 |
--- a/src/core/SkPixelRef.cpp |
+++ b/src/core/SkPixelRef.cpp |
@@ -100,7 +100,7 @@ SkPixelRef::SkPixelRef(const SkImageInfo& info) |
this->needsNewGenID(); |
fIsImmutable = false; |
fPreLocked = false; |
- fAddedToCache.store(false); |
+ fAddedToCache = false; |
} |
@@ -116,7 +116,7 @@ SkPixelRef::SkPixelRef(const SkImageInfo& info, SkBaseMutex* mutex) |
this->needsNewGenID(); |
fIsImmutable = false; |
fPreLocked = false; |
- fAddedToCache.store(false); |
+ fAddedToCache = false; |
} |
SkPixelRef::~SkPixelRef() { |
@@ -227,10 +227,9 @@ void SkPixelRef::callGenIDChangeListeners() { |
fGenIDChangeListeners[i]->onChange(); |
} |
- // TODO: SkAtomic could add "old_value = atomic.xchg(new_value)" to make this clearer. |
- if (fAddedToCache.load()) { |
+ if (fAddedToCache) { |
SkNotifyBitmapGenIDIsStale(this->getGenerationID()); |
- fAddedToCache.store(false); |
+ fAddedToCache = false; |
} |
} |
// Listeners get at most one shot, so whether these triggered or not, blow them away. |