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 26 matching lines...) Expand all Loading... |
37 class MessageLoop; | 37 class MessageLoop; |
38 class MessageLoopProxy; | 38 class MessageLoopProxy; |
39 class WaitableEvent; | 39 class WaitableEvent; |
40 } | 40 } |
41 | 41 |
42 namespace IPC { | 42 namespace IPC { |
43 class SyncMessageFilter; | 43 class SyncMessageFilter; |
44 } | 44 } |
45 | 45 |
46 namespace media { | 46 namespace media { |
| 47 class JpegDecodeAccelerator; |
47 class VideoDecodeAccelerator; | 48 class VideoDecodeAccelerator; |
48 class VideoEncodeAccelerator; | 49 class VideoEncodeAccelerator; |
49 } | 50 } |
50 | 51 |
51 namespace gpu { | 52 namespace gpu { |
52 class GpuMemoryBufferManager; | 53 class GpuMemoryBufferManager; |
53 } | 54 } |
54 | 55 |
55 namespace content { | 56 namespace content { |
56 class CommandBufferProxyImpl; | 57 class CommandBufferProxyImpl; |
57 class GpuChannelHost; | 58 class GpuChannelHost; |
| 59 class GpuJpegDecodeAcceleratorHost; |
58 | 60 |
59 struct GpuListenerInfo { | 61 struct GpuListenerInfo { |
60 GpuListenerInfo(); | 62 GpuListenerInfo(); |
61 ~GpuListenerInfo(); | 63 ~GpuListenerInfo(); |
62 | 64 |
63 base::WeakPtr<IPC::Listener> listener; | 65 base::WeakPtr<IPC::Listener> listener; |
64 scoped_refptr<base::MessageLoopProxy> loop; | 66 scoped_refptr<base::MessageLoopProxy> loop; |
65 }; | 67 }; |
66 | 68 |
67 struct ProxyFlushInfo { | 69 struct ProxyFlushInfo { |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 gfx::GpuPreference gpu_preference); | 143 gfx::GpuPreference gpu_preference); |
142 | 144 |
143 // Creates a video decoder in the GPU process. | 145 // Creates a video decoder in the GPU process. |
144 scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecoder( | 146 scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecoder( |
145 int command_buffer_route_id); | 147 int command_buffer_route_id); |
146 | 148 |
147 // Creates a video encoder in the GPU process. | 149 // Creates a video encoder in the GPU process. |
148 scoped_ptr<media::VideoEncodeAccelerator> CreateVideoEncoder( | 150 scoped_ptr<media::VideoEncodeAccelerator> CreateVideoEncoder( |
149 int command_buffer_route_id); | 151 int command_buffer_route_id); |
150 | 152 |
| 153 // Creates a JPEG decoder in the GPU process. |
| 154 scoped_ptr<media::JpegDecodeAccelerator> CreateJpegDecoder(); |
| 155 |
151 // Destroy a command buffer created by this channel. | 156 // Destroy a command buffer created by this channel. |
152 void DestroyCommandBuffer(CommandBufferProxyImpl* command_buffer); | 157 void DestroyCommandBuffer(CommandBufferProxyImpl* command_buffer); |
153 | 158 |
154 // Destroy this channel. Must be called on the main thread, before | 159 // Destroy this channel. Must be called on the main thread, before |
155 // destruction. | 160 // destruction. |
156 void DestroyChannel(); | 161 void DestroyChannel(); |
157 | 162 |
158 // Add a route for the current message loop. | 163 // Add a route for the current message loop. |
159 void AddRoute(int route_id, base::WeakPtr<IPC::Listener> listener); | 164 void AddRoute(int route_id, base::WeakPtr<IPC::Listener> listener); |
160 void RemoveRoute(int route_id); | 165 void RemoveRoute(int route_id); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; | 275 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; |
271 ProxyMap proxies_; | 276 ProxyMap proxies_; |
272 ProxyFlushInfo flush_info_; | 277 ProxyFlushInfo flush_info_; |
273 | 278 |
274 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 279 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
275 }; | 280 }; |
276 | 281 |
277 } // namespace content | 282 } // namespace content |
278 | 283 |
279 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 284 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
OLD | NEW |