| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "gpu/command_buffer/service/sync_point_manager.h" | 5 #include "gpu/command_buffer/service/sync_point_manager.h" |
| 6 | 6 |
| 7 #include <climits> | 7 #include <climits> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 bool SyncPointManager::IsSyncPointRetired(uint32 sync_point) { | 75 bool SyncPointManager::IsSyncPointRetired(uint32 sync_point) { |
| 76 DCHECK(thread_checker_.CalledOnValidThread()); | 76 DCHECK(thread_checker_.CalledOnValidThread()); |
| 77 { | 77 { |
| 78 base::AutoLock lock(lock_); | 78 base::AutoLock lock(lock_); |
| 79 SyncPointMap::iterator it = sync_point_map_.find(sync_point); | 79 SyncPointMap::iterator it = sync_point_map_.find(sync_point); |
| 80 return it == sync_point_map_.end(); | 80 return it == sync_point_map_.end(); |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 | 83 |
| 84 bool SyncPointManager::WasSyncPointGenerated(uint32 sync_point) { |
| 85 base::AutoLock lock(lock_); |
| 86 |
| 87 return next_sync_point_ - 1 - sync_point < 0x80000000; |
| 88 } |
| 89 |
| 84 } // namespace gpu | 90 } // namespace gpu |
| OLD | NEW |