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

Side by Side Diff: content/common/gpu/sync_point_manager.cc

Issue 11227033: Move a bunch of code in content\common (as well as a few left in renderer) to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 2 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 | Annotate | Revision Log
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 {
10
9 SyncPointManager::SyncPointManager() 11 SyncPointManager::SyncPointManager()
10 : next_sync_point_(1) { 12 : next_sync_point_(1) {
11 } 13 }
12 14
13 SyncPointManager::~SyncPointManager() { 15 SyncPointManager::~SyncPointManager() {
14 } 16 }
15 17
16 uint32 SyncPointManager::GenerateSyncPoint() { 18 uint32 SyncPointManager::GenerateSyncPoint() {
17 base::AutoLock lock(lock_); 19 base::AutoLock lock(lock_);
18 uint32 sync_point = next_sync_point_++; 20 uint32 sync_point = next_sync_point_++;
(...skipping 28 matching lines...) Expand all
47 { 49 {
48 base::AutoLock lock(lock_); 50 base::AutoLock lock(lock_);
49 SyncPointMap::iterator it = sync_point_map_.find(sync_point); 51 SyncPointMap::iterator it = sync_point_map_.find(sync_point);
50 if (it != sync_point_map_.end()) { 52 if (it != sync_point_map_.end()) {
51 it->second.push_back(callback); 53 it->second.push_back(callback);
52 return; 54 return;
53 } 55 }
54 } 56 }
55 callback.Run(); 57 callback.Run();
56 } 58 }
59
60 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/sync_point_manager.h ('k') | content/common/gpu/texture_image_transport_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698