| 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_GPU_CHANNEL_HOST_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 class VideoEncodeAccelerator; | 48 class VideoEncodeAccelerator; |
| 49 } | 49 } |
| 50 | 50 |
| 51 namespace gpu { | 51 namespace gpu { |
| 52 class GpuMemoryBufferManager; | 52 class GpuMemoryBufferManager; |
| 53 } | 53 } |
| 54 | 54 |
| 55 namespace content { | 55 namespace content { |
| 56 class CommandBufferProxyImpl; | 56 class CommandBufferProxyImpl; |
| 57 class GpuChannelHost; | 57 class GpuChannelHost; |
| 58 class GpuJpegDecodeAcceleratorHost; |
| 58 | 59 |
| 59 struct GpuListenerInfo { | 60 struct GpuListenerInfo { |
| 60 GpuListenerInfo(); | 61 GpuListenerInfo(); |
| 61 ~GpuListenerInfo(); | 62 ~GpuListenerInfo(); |
| 62 | 63 |
| 63 base::WeakPtr<IPC::Listener> listener; | 64 base::WeakPtr<IPC::Listener> listener; |
| 64 scoped_refptr<base::MessageLoopProxy> loop; | 65 scoped_refptr<base::MessageLoopProxy> loop; |
| 65 }; | 66 }; |
| 66 | 67 |
| 67 struct ProxyFlushInfo { | 68 struct ProxyFlushInfo { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // Destroy a command buffer created by this channel. | 152 // Destroy a command buffer created by this channel. |
| 152 void DestroyCommandBuffer(CommandBufferProxyImpl* command_buffer); | 153 void DestroyCommandBuffer(CommandBufferProxyImpl* command_buffer); |
| 153 | 154 |
| 154 // Destroy this channel. | 155 // Destroy this channel. |
| 155 void DestroyChannel(); | 156 void DestroyChannel(); |
| 156 | 157 |
| 157 // Add a route for the current message loop. | 158 // Add a route for the current message loop. |
| 158 void AddRoute(int route_id, base::WeakPtr<IPC::Listener> listener); | 159 void AddRoute(int route_id, base::WeakPtr<IPC::Listener> listener); |
| 159 void RemoveRoute(int route_id); | 160 void RemoveRoute(int route_id); |
| 160 | 161 |
| 162 GpuJpegDecodeAcceleratorHost* CreateJpegDecoder(); |
| 163 |
| 161 GpuChannelHostFactory* factory() const { return factory_; } | 164 GpuChannelHostFactory* factory() const { return factory_; } |
| 162 | 165 |
| 163 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() const { | 166 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() const { |
| 164 return gpu_memory_buffer_manager_; | 167 return gpu_memory_buffer_manager_; |
| 165 } | 168 } |
| 166 | 169 |
| 167 // Returns a handle to the shared memory that can be sent via IPC to the | 170 // Returns a handle to the shared memory that can be sent via IPC to the |
| 168 // GPU process. The caller is responsible for ensuring it is closed. Returns | 171 // GPU process. The caller is responsible for ensuring it is closed. Returns |
| 169 // an invalid handle on failure. | 172 // an invalid handle on failure. |
| 170 base::SharedMemoryHandle ShareToGpuProcess( | 173 base::SharedMemoryHandle ShareToGpuProcess( |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; | 272 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; |
| 270 ProxyMap proxies_; | 273 ProxyMap proxies_; |
| 271 ProxyFlushInfo flush_info_; | 274 ProxyFlushInfo flush_info_; |
| 272 | 275 |
| 273 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 276 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
| 274 }; | 277 }; |
| 275 | 278 |
| 276 } // namespace content | 279 } // namespace content |
| 277 | 280 |
| 278 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 281 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
| OLD | NEW |