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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecoder( | 127 scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecoder( |
128 int command_buffer_route_id); | 128 int command_buffer_route_id); |
129 | 129 |
130 // Creates a video encoder in the GPU process. | 130 // Creates a video encoder in the GPU process. |
131 scoped_ptr<media::VideoEncodeAccelerator> CreateVideoEncoder( | 131 scoped_ptr<media::VideoEncodeAccelerator> CreateVideoEncoder( |
132 int command_buffer_route_id); | 132 int command_buffer_route_id); |
133 | 133 |
134 // Destroy a command buffer created by this channel. | 134 // Destroy a command buffer created by this channel. |
135 void DestroyCommandBuffer(CommandBufferProxyImpl* command_buffer); | 135 void DestroyCommandBuffer(CommandBufferProxyImpl* command_buffer); |
136 | 136 |
| 137 // Destroy this channel. |
| 138 void DestroyChannel(); |
| 139 |
137 // Add a route for the current message loop. | 140 // Add a route for the current message loop. |
138 void AddRoute(int route_id, base::WeakPtr<IPC::Listener> listener); | 141 void AddRoute(int route_id, base::WeakPtr<IPC::Listener> listener); |
139 void RemoveRoute(int route_id); | 142 void RemoveRoute(int route_id); |
140 | 143 |
141 GpuChannelHostFactory* factory() const { return factory_; } | 144 GpuChannelHostFactory* factory() const { return factory_; } |
142 | 145 |
143 // Returns a handle to the shared memory that can be sent via IPC to the | 146 // Returns a handle to the shared memory that can be sent via IPC to the |
144 // GPU process. The caller is responsible for ensuring it is closed. Returns | 147 // GPU process. The caller is responsible for ensuring it is closed. Returns |
145 // an invalid handle on failure. | 148 // an invalid handle on failure. |
146 base::SharedMemoryHandle ShareToGpuProcess( | 149 base::SharedMemoryHandle ShareToGpuProcess( |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 // Used to look up a proxy from its routing id. | 241 // Used to look up a proxy from its routing id. |
239 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; | 242 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; |
240 ProxyMap proxies_; | 243 ProxyMap proxies_; |
241 | 244 |
242 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 245 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
243 }; | 246 }; |
244 | 247 |
245 } // namespace content | 248 } // namespace content |
246 | 249 |
247 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 250 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
OLD | NEW |