Index: gpu/command_buffer/client/gles2_implementation.cc |
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc |
index 9bb62324ec89a1e116803cb62f01832f9b04cf1d..38a3acd868d51ee01a3085c67503ef70b993af65 100644 |
--- a/gpu/command_buffer/client/gles2_implementation.cc |
+++ b/gpu/command_buffer/client/gles2_implementation.cc |
@@ -17,6 +17,7 @@ |
#include <set> |
#include <sstream> |
#include <string> |
+#include "base/atomic_sequence_num.h" |
#include "base/compiler_specific.h" |
#include "base/strings/string_split.h" |
#include "base/strings/stringprintf.h" |
@@ -77,10 +78,8 @@ GLuint ToGLuint(const void* ptr) { |
} |
uint32_t GenerateNextFlushId() { |
- static base::subtle::Atomic32 flush_id = 0; |
- base::subtle::Atomic32 my_id = |
- base::subtle::Barrier_AtomicIncrement(&flush_id, 1); |
- return static_cast<uint32_t>(my_id); |
+ static base::AtomicSequenceNumber flush_id; |
piman
2016/03/16 23:49:29
I was thinking, move this out of the function and
danakj
2016/03/16 23:50:41
Oh, snap. Sure :)
|
+ return static_cast<uint32_t>(flush_id.GetNext()); |
} |
} // anonymous namespace |