Chromium Code Reviews| Index: gpu/command_buffer/service/sync_point_manager.h |
| diff --git a/gpu/command_buffer/service/sync_point_manager.h b/gpu/command_buffer/service/sync_point_manager.h |
| index 8cbf8a838f97c8a2ad57332c25103dfc680a6687..b0028cacb0024b11302e67decfb88c64465b7a15 100644 |
| --- a/gpu/command_buffer/service/sync_point_manager.h |
| +++ b/gpu/command_buffer/service/sync_point_manager.h |
| @@ -10,10 +10,14 @@ |
| #include "base/callback.h" |
| #include "base/containers/hash_tables.h" |
| #include "base/memory/ref_counted.h" |
| +#include "base/memory/scoped_ptr.h" |
| #include "base/synchronization/lock.h" |
| -#include "base/threading/thread_checker.h" |
| #include "gpu/gpu_export.h" |
| +namespace base { |
| +class SequenceChecker; |
| +} |
| + |
| namespace gpu { |
| // This class manages the sync points, which allow cross-channel |
| @@ -21,7 +25,8 @@ namespace gpu { |
| class GPU_EXPORT SyncPointManager |
| : public base::RefCountedThreadSafe<SyncPointManager> { |
| public: |
| - SyncPointManager(); |
| + static SyncPointManager* Create(); |
|
no sievers
2015/02/11 00:27:27
nit: maybe just Create(bool allow_threaded_calls)?
boliu
2015/02/11 00:59:04
Done.
|
| + static SyncPointManager* CreateMultiThread(); |
| // Generates a sync point, returning its ID. This can me called on any thread. |
| // IDs start at a random number. Never return 0. |
| @@ -44,9 +49,11 @@ class GPU_EXPORT SyncPointManager |
| typedef std::vector<base::Closure> ClosureList; |
| typedef base::hash_map<uint32, ClosureList> SyncPointMap; |
| + explicit SyncPointManager(bool enable_thread_checker); |
| ~SyncPointManager(); |
| + void CheckSequencedThread(); |
| - base::ThreadChecker thread_checker_; |
| + scoped_ptr<base::SequenceChecker> sequence_checker_; |
| // Protects the 2 fields below. Note: callbacks shouldn't be called with this |
| // held. |