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 |
11 #include "base/atomic_sequence_num.h" | 11 #include "base/atomic_sequence_num.h" |
12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/process/process.h" | 16 #include "base/process/process.h" |
17 #include "base/synchronization/lock.h" | 17 #include "base/synchronization/lock.h" |
18 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
19 #include "content/common/gpu/gpu_process_launch_causes.h" | 19 #include "content/common/gpu/gpu_process_launch_causes.h" |
20 #include "content/common/message_router.h" | 20 #include "content/common/message_router.h" |
21 #include "gpu/config/gpu_info.h" | 21 #include "gpu/config/gpu_info.h" |
22 #include "ipc/ipc_channel_handle.h" | 22 #include "ipc/ipc_channel_handle.h" |
23 #include "ipc/ipc_channel_proxy.h" | 23 #include "ipc/ipc_channel_proxy.h" |
24 #include "ipc/ipc_sync_channel.h" | 24 #include "ipc/ipc_sync_channel.h" |
25 #include "media/video/video_decode_accelerator.h" | 25 #include "media/video/video_decode_accelerator.h" |
| 26 #include "media/video/video_encode_accelerator.h" |
26 #include "ui/gfx/native_widget_types.h" | 27 #include "ui/gfx/native_widget_types.h" |
27 #include "ui/gfx/size.h" | 28 #include "ui/gfx/size.h" |
28 #include "ui/gl/gpu_preference.h" | 29 #include "ui/gl/gpu_preference.h" |
29 | 30 |
30 class GURL; | 31 class GURL; |
31 class TransportTextureService; | 32 class TransportTextureService; |
32 struct GPUCreateCommandBufferConfig; | 33 struct GPUCreateCommandBufferConfig; |
33 | 34 |
34 namespace base { | 35 namespace base { |
35 class MessageLoop; | 36 class MessageLoop; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 const std::vector<int32>& attribs, | 122 const std::vector<int32>& attribs, |
122 const GURL& active_url, | 123 const GURL& active_url, |
123 gfx::GpuPreference gpu_preference); | 124 gfx::GpuPreference gpu_preference); |
124 | 125 |
125 // Creates a video decoder in the GPU process. | 126 // Creates a video decoder in the GPU process. |
126 scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecoder( | 127 scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecoder( |
127 int command_buffer_route_id, | 128 int command_buffer_route_id, |
128 media::VideoCodecProfile profile, | 129 media::VideoCodecProfile profile, |
129 media::VideoDecodeAccelerator::Client* client); | 130 media::VideoDecodeAccelerator::Client* client); |
130 | 131 |
| 132 // Creates a video encoder in the GPU process. |
| 133 scoped_ptr<media::VideoEncodeAccelerator> CreateVideoEncoder( |
| 134 media::VideoEncodeAccelerator::Client* client); |
| 135 |
131 // Destroy a command buffer created by this channel. | 136 // Destroy a command buffer created by this channel. |
132 void DestroyCommandBuffer(CommandBufferProxyImpl* command_buffer); | 137 void DestroyCommandBuffer(CommandBufferProxyImpl* command_buffer); |
133 | 138 |
134 // Collect rendering stats from GPU process. | 139 // Collect rendering stats from GPU process. |
135 bool CollectRenderingStatsForSurface( | 140 bool CollectRenderingStatsForSurface( |
136 int surface_id, GpuRenderingStats* stats); | 141 int surface_id, GpuRenderingStats* stats); |
137 | 142 |
138 // Add a route for the current message loop. | 143 // Add a route for the current message loop. |
139 void AddRoute(int route_id, base::WeakPtr<IPC::Listener> listener); | 144 void AddRoute(int route_id, base::WeakPtr<IPC::Listener> listener); |
140 void RemoveRoute(int route_id); | 145 void RemoveRoute(int route_id); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 // Used to look up a proxy from its routing id. | 251 // Used to look up a proxy from its routing id. |
247 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; | 252 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; |
248 ProxyMap proxies_; | 253 ProxyMap proxies_; |
249 | 254 |
250 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 255 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
251 }; | 256 }; |
252 | 257 |
253 } // namespace content | 258 } // namespace content |
254 | 259 |
255 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 260 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
OLD | NEW |