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 CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
7 | 7 |
8 #if defined(ENABLE_GPU) | 8 #if defined(ENABLE_GPU) |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <queue> | 11 #include <queue> |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "gpu/ipc/command_buffer_proxy.h" | 14 #include "gpu/ipc/command_buffer_proxy.h" |
15 | 15 |
16 #include "base/callback.h" | 16 #include "base/callback.h" |
17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
18 #include "base/hash_tables.h" | 18 #include "base/hash_tables.h" |
19 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
21 #include "content/common/gpu/client/gpu_video_decode_accelerator_host.h" | 21 #include "content/common/gpu/client/gpu_video_decode_accelerator_host.h" |
22 #include "gpu/command_buffer/common/command_buffer.h" | 22 #include "gpu/command_buffer/common/command_buffer.h" |
23 #include "gpu/command_buffer/common/command_buffer_shared.h" | 23 #include "gpu/command_buffer/common/command_buffer_shared.h" |
24 #include "ipc/ipc_listener.h" | 24 #include "ipc/ipc_listener.h" |
25 | 25 |
26 class GpuChannelHost; | |
27 struct GPUCommandBufferConsoleMessage; | 26 struct GPUCommandBufferConsoleMessage; |
28 struct GpuMemoryAllocationForRenderer; | |
29 | 27 |
30 namespace base { | 28 namespace base { |
31 class SharedMemory; | 29 class SharedMemory; |
32 } | 30 } |
33 | 31 |
| 32 namespace content { |
| 33 class GpuChannelHost; |
| 34 struct GpuMemoryAllocationForRenderer; |
| 35 |
34 // Client side proxy that forwards messages synchronously to a | 36 // Client side proxy that forwards messages synchronously to a |
35 // CommandBufferStub. | 37 // CommandBufferStub. |
36 class CommandBufferProxyImpl | 38 class CommandBufferProxyImpl |
37 : public CommandBufferProxy, | 39 : public CommandBufferProxy, |
38 public IPC::Listener, | 40 public IPC::Listener, |
39 public base::SupportsWeakPtr<CommandBufferProxyImpl> { | 41 public base::SupportsWeakPtr<CommandBufferProxyImpl> { |
40 public: | 42 public: |
41 typedef base::Callback<void( | 43 typedef base::Callback<void( |
42 const std::string& msg, int id)> GpuConsoleMessageCallback; | 44 const std::string& msg, int id)> GpuConsoleMessageCallback; |
43 | 45 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // Tasks to be invoked in SignalSyncPoint responses. | 164 // Tasks to be invoked in SignalSyncPoint responses. |
163 uint32 next_signal_id_; | 165 uint32 next_signal_id_; |
164 SignalTaskMap signal_tasks_; | 166 SignalTaskMap signal_tasks_; |
165 | 167 |
166 // ID of transfer buffer containing shared state. | 168 // ID of transfer buffer containing shared state. |
167 int32 state_buffer_; | 169 int32 state_buffer_; |
168 | 170 |
169 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 171 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
170 }; | 172 }; |
171 | 173 |
| 174 } // namespace content |
| 175 |
172 #endif // ENABLE_GPU | 176 #endif // ENABLE_GPU |
173 | 177 |
174 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 178 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
OLD | NEW |