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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « content/common/gpu/sync_point_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/common/gpu/sync_point_manager.h" 5 #include "content/common/gpu/sync_point_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 base::AutoLock lock(lock_); 50 base::AutoLock lock(lock_);
51 SyncPointMap::iterator it = sync_point_map_.find(sync_point); 51 SyncPointMap::iterator it = sync_point_map_.find(sync_point);
52 if (it != sync_point_map_.end()) { 52 if (it != sync_point_map_.end()) {
53 it->second.push_back(callback); 53 it->second.push_back(callback);
54 return; 54 return;
55 } 55 }
56 } 56 }
57 callback.Run(); 57 callback.Run();
58 } 58 }
59 59
60 bool SyncPointManager::IsSyncPointRetired(uint32 sync_point) {
61 DCHECK(thread_checker_.CalledOnValidThread());
62 {
63 base::AutoLock lock(lock_);
64 SyncPointMap::iterator it = sync_point_map_.find(sync_point);
65 if (it != sync_point_map_.end())
piman 2014/01/08 21:43:54 nit: just return it == sync_point_map_.end()
66 return false;
67 }
68 return true;
69 }
70
60 } // namespace content 71 } // namespace content
OLDNEW
« 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