port most SkAtomic<T> to std::atomic<T>
The only SkAtomic<T> left are the ones overriding the default memory
order in SkPath. I think I'd like to try switching them to std::atomic
too, but in another CL.
Trim unused APIs in SkAtomics.h.
Change-Id: Ia1c283355902ccb8fcdad70cdf27bb577e8ca407
Reviewed-on: https://skia-review.googlesource.com/146529
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
diff --git a/src/core/SkSharedMutex.h b/src/core/SkSharedMutex.h
index 33f1f10..1177844 100644
--- a/src/core/SkSharedMutex.h
+++ b/src/core/SkSharedMutex.h
@@ -8,10 +8,10 @@
#ifndef SkSharedLock_DEFINED
#define SkSharedLock_DEFINED
-#include "SkAtomics.h"
#include "SkMacros.h"
#include "SkSemaphore.h"
#include "SkTypes.h"
+#include <atomic>
#ifdef SK_DEBUG
#include "SkMutex.h"
@@ -59,9 +59,9 @@
SkSemaphore fSharedQueue[2];
SkSemaphore fExclusiveQueue;
#else
- SkAtomic<int32_t> fQueueCounts;
- SkSemaphore fSharedQueue;
- SkSemaphore fExclusiveQueue;
+ std::atomic<int32_t> fQueueCounts;
+ SkSemaphore fSharedQueue;
+ SkSemaphore fExclusiveQueue;
#endif // SK_DEBUG
};