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

Unified Diff: content/common/gpu/sync_point_manager.cc

Issue 128123002: gpu: Early return GpuCommandBufferStub::OnWaitSyncPoint() if the sync point is retired. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/sync_point_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 917871c4dcb4c9464f1492ac4a9d5d10ac294aa3..b6ba42a8da550160f086d78c749cb48e03324eba 100644
--- a/content/common/gpu/sync_point_manager.cc
+++ b/content/common/gpu/sync_point_manager.cc
@@ -57,4 +57,15 @@ void SyncPointManager::AddSyncPointCallback(uint32 sync_point,
callback.Run();
}
+bool SyncPointManager::IsSyncPointRetired(uint32 sync_point) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ {
+ base::AutoLock lock(lock_);
+ SyncPointMap::iterator it = sync_point_map_.find(sync_point);
+ if (it != sync_point_map_.end())
piman 2014/01/08 21:43:54 nit: just return it == sync_point_map_.end()
+ return false;
+ }
+ return true;
+}
+
} // namespace content
« no previous file with comments | « content/common/gpu/sync_point_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698