| 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 <stdint.h> |
| 9 |
| 9 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
| 11 #include "base/macros.h" |
| 10 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 13 #include "gpu/command_buffer/common/value_state.h" | 15 #include "gpu/command_buffer/common/value_state.h" |
| 14 #include "gpu/gpu_export.h" | 16 #include "gpu/gpu_export.h" |
| 15 | 17 |
| 16 namespace content { | 18 namespace content { |
| 17 class GpuChannel; | 19 class GpuChannel; |
| 18 } | 20 } |
| 19 | 21 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 120 |
| 119 // Gets the Valuebuffer for the given Valuebuffer id. | 121 // Gets the Valuebuffer for the given Valuebuffer id. |
| 120 Valuebuffer* GetValuebuffer(unsigned int client_id); | 122 Valuebuffer* GetValuebuffer(unsigned int client_id); |
| 121 | 123 |
| 122 // Removes a Valuebuffer for the given Valuebuffer id. | 124 // Removes a Valuebuffer for the given Valuebuffer id. |
| 123 void RemoveValuebuffer(unsigned int client_id); | 125 void RemoveValuebuffer(unsigned int client_id); |
| 124 | 126 |
| 125 // Updates the value state for the given Valuebuffer | 127 // Updates the value state for the given Valuebuffer |
| 126 void UpdateValuebufferState(Valuebuffer* valuebuffer); | 128 void UpdateValuebufferState(Valuebuffer* valuebuffer); |
| 127 | 129 |
| 128 static uint32 ApiTypeForSubscriptionTarget(unsigned int target); | 130 static uint32_t ApiTypeForSubscriptionTarget(unsigned int target); |
| 129 | 131 |
| 130 private: | 132 private: |
| 131 friend class Valuebuffer; | 133 friend class Valuebuffer; |
| 132 | 134 |
| 133 typedef base::hash_map<unsigned int, scoped_refptr<Valuebuffer>> | 135 typedef base::hash_map<unsigned int, scoped_refptr<Valuebuffer>> |
| 134 ValuebufferMap; | 136 ValuebufferMap; |
| 135 | 137 |
| 136 void StartTracking(Valuebuffer* valuebuffer); | 138 void StartTracking(Valuebuffer* valuebuffer); |
| 137 void StopTracking(Valuebuffer* valuebuffer); | 139 void StopTracking(Valuebuffer* valuebuffer); |
| 138 | 140 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 154 // many value buffers are currently subscribed to each | 156 // many value buffers are currently subscribed to each |
| 155 scoped_refptr<SubscriptionRefSet> subscription_ref_set_; | 157 scoped_refptr<SubscriptionRefSet> subscription_ref_set_; |
| 156 | 158 |
| 157 DISALLOW_COPY_AND_ASSIGN(ValuebufferManager); | 159 DISALLOW_COPY_AND_ASSIGN(ValuebufferManager); |
| 158 }; | 160 }; |
| 159 | 161 |
| 160 } // namespace gles2 | 162 } // namespace gles2 |
| 161 } // namespace gpu | 163 } // namespace gpu |
| 162 | 164 |
| 163 #endif // GPU_COMMAND_BUFFER_SERVICE_VALUEBUFFER_MANAGER_H_ | 165 #endif // GPU_COMMAND_BUFFER_SERVICE_VALUEBUFFER_MANAGER_H_ |
| OLD | NEW |