OLD | NEW |
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 GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 5 #ifndef GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
6 #define GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 6 #define GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <map> | 11 #include <map> |
| 12 #include <memory> |
12 #include <queue> | 13 #include <queue> |
13 #include <string> | 14 #include <string> |
14 | 15 |
15 #include "base/callback.h" | 16 #include "base/callback.h" |
16 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
17 #include "base/containers/hash_tables.h" | 18 #include "base/containers/hash_tables.h" |
18 #include "base/containers/scoped_ptr_hash_map.h" | 19 #include "base/containers/scoped_ptr_hash_map.h" |
19 #include "base/macros.h" | 20 #include "base/macros.h" |
20 #include "base/memory/ref_counted.h" | 21 #include "base/memory/ref_counted.h" |
21 #include "base/memory/weak_ptr.h" | 22 #include "base/memory/weak_ptr.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // Client that wants to listen for important events on the GpuControl. | 201 // Client that wants to listen for important events on the GpuControl. |
201 gpu::GpuControlClient* gpu_control_client_; | 202 gpu::GpuControlClient* gpu_control_client_; |
202 | 203 |
203 // Unowned list of DeletionObservers. | 204 // Unowned list of DeletionObservers. |
204 base::ObserverList<DeletionObserver> deletion_observers_; | 205 base::ObserverList<DeletionObserver> deletion_observers_; |
205 | 206 |
206 // The last cached state received from the service. | 207 // The last cached state received from the service. |
207 State last_state_; | 208 State last_state_; |
208 | 209 |
209 // The shared memory area used to update state. | 210 // The shared memory area used to update state. |
210 scoped_ptr<base::SharedMemory> shared_state_shm_; | 211 std::unique_ptr<base::SharedMemory> shared_state_shm_; |
211 | 212 |
212 // |*this| is owned by |*channel_| and so is always outlived by it, so using a | 213 // |*this| is owned by |*channel_| and so is always outlived by it, so using a |
213 // raw pointer is ok. | 214 // raw pointer is ok. |
214 GpuChannelHost* channel_; | 215 GpuChannelHost* channel_; |
215 const gpu::CommandBufferId command_buffer_id_; | 216 const gpu::CommandBufferId command_buffer_id_; |
216 const int32_t route_id_; | 217 const int32_t route_id_; |
217 const int32_t stream_id_; | 218 const int32_t stream_id_; |
218 uint32_t flush_count_; | 219 uint32_t flush_count_; |
219 int32_t last_put_offset_; | 220 int32_t last_put_offset_; |
220 int32_t last_barrier_put_offset_; | 221 int32_t last_barrier_put_offset_; |
(...skipping 25 matching lines...) Expand all Loading... |
246 | 247 |
247 base::WeakPtr<CommandBufferProxyImpl> weak_this_; | 248 base::WeakPtr<CommandBufferProxyImpl> weak_this_; |
248 scoped_refptr<base::SequencedTaskRunner> callback_thread_; | 249 scoped_refptr<base::SequencedTaskRunner> callback_thread_; |
249 | 250 |
250 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 251 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
251 }; | 252 }; |
252 | 253 |
253 } // namespace gpu | 254 } // namespace gpu |
254 | 255 |
255 #endif // GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 256 #endif // GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
OLD | NEW |