Index: src/gpu/vk/GrVkResource.h |
diff --git a/src/gpu/vk/GrVkResource.h b/src/gpu/vk/GrVkResource.h |
index 3999749b6e8790898fda2fdba944c57385465e5b..83e82fb5b1ac908f7e564c1ff6421946e759eb0e 100644 |
--- a/src/gpu/vk/GrVkResource.h |
+++ b/src/gpu/vk/GrVkResource.h |
@@ -60,14 +60,14 @@ public: |
}; |
static Trace fTrace; |
- static SkRandom fRandom; |
+ static uint32_t fKeyCounter; |
#endif |
/** Default construct, initializing the reference count to 1. |
*/ |
GrVkResource() : fRefCnt(1) { |
#ifdef SK_TRACE_VK_RESOURCES |
- fKey = fRandom.nextU(); |
+ fKey = sk_atomic_fetch_add(&fKeyCounter, 1u, sk_memory_order_relaxed); |
fTrace.add(this); |
#endif |
} |