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