| 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..8cb9716e7e3efc4c9f5e2c68174b8a607219868c 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"
|
| @@ -76,11 +77,10 @@ GLuint ToGLuint(const void* ptr) {
|
| return static_cast<GLuint>(reinterpret_cast<size_t>(ptr));
|
| }
|
|
|
| +static base::StaticAtomicSequenceNumber g_flush_id;
|
| +
|
| 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);
|
| + return static_cast<uint32_t>(g_flush_id.GetNext());
|
| }
|
|
|
| } // anonymous namespace
|
|
|