| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 GPU_COMMAND_BUFFER_SERVICE_VALUEBUFFER_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_VALUEBUFFER_MANAGER_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_VALUEBUFFER_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_VALUEBUFFER_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 friend class base::RefCounted<SubscriptionRefSet>; | 45 friend class base::RefCounted<SubscriptionRefSet>; |
| 46 friend class ValuebufferManager; | 46 friend class ValuebufferManager; |
| 47 | 47 |
| 48 typedef base::hash_map<unsigned int, int> RefSet; | 48 typedef base::hash_map<unsigned int, int> RefSet; |
| 49 | 49 |
| 50 void AddSubscription(unsigned int target); | 50 void AddSubscription(unsigned int target); |
| 51 void RemoveSubscription(unsigned int target); | 51 void RemoveSubscription(unsigned int target); |
| 52 | 52 |
| 53 RefSet reference_set_; | 53 RefSet reference_set_; |
| 54 | 54 |
| 55 ObserverList<Observer, true> observers_; | 55 base::ObserverList<Observer, true> observers_; |
| 56 | 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(SubscriptionRefSet); | 57 DISALLOW_COPY_AND_ASSIGN(SubscriptionRefSet); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 class GPU_EXPORT Valuebuffer : public base::RefCounted<Valuebuffer> { | 60 class GPU_EXPORT Valuebuffer : public base::RefCounted<Valuebuffer> { |
| 61 public: | 61 public: |
| 62 Valuebuffer(ValuebufferManager* manager, unsigned int client_id); | 62 Valuebuffer(ValuebufferManager* manager, unsigned int client_id); |
| 63 | 63 |
| 64 unsigned int client_id() const { return client_id_; } | 64 unsigned int client_id() const { return client_id_; } |
| 65 | 65 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // many value buffers are currently subscribed to each | 154 // many value buffers are currently subscribed to each |
| 155 scoped_refptr<SubscriptionRefSet> subscription_ref_set_; | 155 scoped_refptr<SubscriptionRefSet> subscription_ref_set_; |
| 156 | 156 |
| 157 DISALLOW_COPY_AND_ASSIGN(ValuebufferManager); | 157 DISALLOW_COPY_AND_ASSIGN(ValuebufferManager); |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 } // namespace gles2 | 160 } // namespace gles2 |
| 161 } // namespace gpu | 161 } // namespace gpu |
| 162 | 162 |
| 163 #endif // GPU_COMMAND_BUFFER_SERVICE_VALUEBUFFER_MANAGER_H_ | 163 #endif // GPU_COMMAND_BUFFER_SERVICE_VALUEBUFFER_MANAGER_H_ |
| OLD | NEW |