remove sk_atomic_inc
Change-Id: I4960b1cd055daf44637e95825f82cb7fe2ce134a
Reviewed-on: https://skia-review.googlesource.com/c/174285
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp
index e4aab42..0ff350a 100644
--- a/tests/ProcessorTest.cpp
+++ b/tests/ProcessorTest.cpp
@@ -23,6 +23,7 @@
#include "ops/GrRectOpFactory.h"
#include "TestUtils.h"
+#include <atomic>
#include <random>
namespace {
@@ -84,9 +85,8 @@
const char* name() const override { return "test"; }
void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
- // We don't really care about reusing these.
- static int32_t gKey = 0;
- b->add32(sk_atomic_inc(&gKey));
+ static std::atomic<int32_t> nextKey{0};
+ b->add32(nextKey++);
}
std::unique_ptr<GrFragmentProcessor> clone() const override {