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

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

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 #ifndef CONTENT_COMMON_GPU_SYNC_POINT_MANAGER_H_ 5 #ifndef CONTENT_COMMON_GPU_SYNC_POINT_MANAGER_H_
6 #define CONTENT_COMMON_GPU_SYNC_POINT_MANAGER_H_ 6 #define CONTENT_COMMON_GPU_SYNC_POINT_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/hash_tables.h" 11 #include "base/hash_tables.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
14 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
15 15
16 namespace content {
17
16 // This class manages the sync points, which allow cross-channel 18 // This class manages the sync points, which allow cross-channel
17 // synchronization. 19 // synchronization.
18 class SyncPointManager : public base::RefCountedThreadSafe<SyncPointManager> { 20 class SyncPointManager : public base::RefCountedThreadSafe<SyncPointManager> {
19 public: 21 public:
20 SyncPointManager(); 22 SyncPointManager();
21 23
22 // Generates a sync point, returning its ID. This can me called on any thread. 24 // Generates a sync point, returning its ID. This can me called on any thread.
23 // IDs start at 1. 25 // IDs start at 1.
24 uint32 GenerateSyncPoint(); 26 uint32 GenerateSyncPoint();
25 27
(...skipping 18 matching lines...) Expand all
44 46
45 // Protects the 2 fields below. Note: callbacks shouldn't be called with this 47 // Protects the 2 fields below. Note: callbacks shouldn't be called with this
46 // held. 48 // held.
47 base::Lock lock_; 49 base::Lock lock_;
48 SyncPointMap sync_point_map_; 50 SyncPointMap sync_point_map_;
49 uint32 next_sync_point_; 51 uint32 next_sync_point_;
50 52
51 DISALLOW_COPY_AND_ASSIGN(SyncPointManager); 53 DISALLOW_COPY_AND_ASSIGN(SyncPointManager);
52 }; 54 };
53 55
56 } // namespace content
57
54 #endif // CONTENT_COMMON_GPU_SYNC_POINT_MANAGER_H_ 58 #endif // CONTENT_COMMON_GPU_SYNC_POINT_MANAGER_H_
OLDNEW
« no previous file with comments | « content/common/gpu/stream_texture_manager_android.h ('k') | content/common/gpu/sync_point_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698