Index: content/common/gpu/sync_point_manager.cc |
diff --git a/content/common/gpu/sync_point_manager.cc b/content/common/gpu/sync_point_manager.cc |
index 0e84e1cb99d41fb111f65c2a2bd50891291a1572..9383574faf9eb1039d8111f0b8ff46389425335f 100644 |
--- a/content/common/gpu/sync_point_manager.cc |
+++ b/content/common/gpu/sync_point_manager.cc |
@@ -4,12 +4,20 @@ |
#include "content/common/gpu/sync_point_manager.h" |
+#include <climits> |
+ |
#include "base/logging.h" |
+#include "base/rand_util.h" |
namespace content { |
+static const int kMaxSyncBase = INT_MAX; |
+ |
SyncPointManager::SyncPointManager() |
- : next_sync_point_(1) { |
+ : next_sync_point_(base::RandInt(1, kMaxSyncBase)) { |
+ // To reduce the risk that a sync point created in a previous GPU process |
+ // will be in flight in the next GPU process, randomize the starting sync |
+ // point number. http://crbug.com/373452 |
} |
SyncPointManager::~SyncPointManager() { |