Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: gpu/command_buffer/service/sync_point_manager.cc

Issue 782583003: List sync points to wait on in AsyncFlush message Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/sync_point_manager.h ('k') | ppapi/proxy/ppapi_command_buffer_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698