| 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/gpu/gpu_result_codes.h" | 20 #include "content/common/gpu/gpu_result_codes.h" |
| 21 #include "content/common/message_router.h" | 21 #include "content/common/message_router.h" |
| 22 #include "gpu/config/gpu_info.h" | 22 #include "gpu/config/gpu_info.h" |
| 23 #include "ipc/ipc_channel_handle.h" | 23 #include "ipc/ipc_channel_handle.h" |
| 24 #include "ipc/ipc_sync_channel.h" | 24 #include "ipc/ipc_sync_channel.h" |
| 25 #include "ipc/message_filter.h" | 25 #include "ipc/message_filter.h" |
| 26 #include "media/video/jpeg_decode_accelerator.h" |
| 26 #include "ui/events/latency_info.h" | 27 #include "ui/events/latency_info.h" |
| 27 #include "ui/gfx/geometry/size.h" | 28 #include "ui/gfx/geometry/size.h" |
| 28 #include "ui/gfx/gpu_memory_buffer.h" | 29 #include "ui/gfx/gpu_memory_buffer.h" |
| 29 #include "ui/gfx/native_widget_types.h" | 30 #include "ui/gfx/native_widget_types.h" |
| 30 #include "ui/gl/gpu_preference.h" | 31 #include "ui/gl/gpu_preference.h" |
| 31 | 32 |
| 32 class GURL; | 33 class GURL; |
| 33 class TransportTextureService; | 34 class TransportTextureService; |
| 34 struct GPUCreateCommandBufferConfig; | 35 struct GPUCreateCommandBufferConfig; |
| 35 | 36 |
| 36 namespace base { | 37 namespace base { |
| 37 class MessageLoop; | 38 class MessageLoop; |
| 38 class WaitableEvent; | 39 class WaitableEvent; |
| 39 } | 40 } |
| 40 | 41 |
| 41 namespace IPC { | 42 namespace IPC { |
| 42 class SyncMessageFilter; | 43 class SyncMessageFilter; |
| 43 } | 44 } |
| 44 | 45 |
| 45 namespace media { | 46 namespace media { |
| 47 class JpegDecodeAccelerator; |
| 46 class VideoDecodeAccelerator; | 48 class VideoDecodeAccelerator; |
| 47 class VideoEncodeAccelerator; | 49 class VideoEncodeAccelerator; |
| 48 } | 50 } |
| 49 | 51 |
| 50 namespace gpu { | 52 namespace gpu { |
| 51 class GpuMemoryBufferManager; | 53 class GpuMemoryBufferManager; |
| 52 } | 54 } |
| 53 | 55 |
| 54 namespace content { | 56 namespace content { |
| 55 class CommandBufferProxyImpl; | 57 class CommandBufferProxyImpl; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 gfx::GpuPreference gpu_preference); | 142 gfx::GpuPreference gpu_preference); |
| 141 | 143 |
| 142 // Creates a video decoder in the GPU process. | 144 // Creates a video decoder in the GPU process. |
| 143 scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecoder( | 145 scoped_ptr<media::VideoDecodeAccelerator> CreateVideoDecoder( |
| 144 int command_buffer_route_id); | 146 int command_buffer_route_id); |
| 145 | 147 |
| 146 // Creates a video encoder in the GPU process. | 148 // Creates a video encoder in the GPU process. |
| 147 scoped_ptr<media::VideoEncodeAccelerator> CreateVideoEncoder( | 149 scoped_ptr<media::VideoEncodeAccelerator> CreateVideoEncoder( |
| 148 int command_buffer_route_id); | 150 int command_buffer_route_id); |
| 149 | 151 |
| 152 // Creates a JPEG decoder in the GPU process. |
| 153 scoped_ptr<media::JpegDecodeAccelerator> CreateJpegDecoder( |
| 154 media::JpegDecodeAccelerator::Client* client); |
| 155 |
| 150 // Destroy a command buffer created by this channel. | 156 // Destroy a command buffer created by this channel. |
| 151 void DestroyCommandBuffer(CommandBufferProxyImpl* command_buffer); | 157 void DestroyCommandBuffer(CommandBufferProxyImpl* command_buffer); |
| 152 | 158 |
| 153 // Destroy this channel. Must be called on the main thread, before | 159 // Destroy this channel. Must be called on the main thread, before |
| 154 // destruction. | 160 // destruction. |
| 155 void DestroyChannel(); | 161 void DestroyChannel(); |
| 156 | 162 |
| 157 // Add a route for the current message loop. | 163 // Add a route for the current message loop. |
| 158 void AddRoute(int route_id, base::WeakPtr<IPC::Listener> listener); | 164 void AddRoute(int route_id, base::WeakPtr<IPC::Listener> listener); |
| 159 void RemoveRoute(int route_id); | 165 void RemoveRoute(int route_id); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; | 275 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; |
| 270 ProxyMap proxies_; | 276 ProxyMap proxies_; |
| 271 ProxyFlushInfo flush_info_; | 277 ProxyFlushInfo flush_info_; |
| 272 | 278 |
| 273 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 279 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
| 274 }; | 280 }; |
| 275 | 281 |
| 276 } // namespace content | 282 } // namespace content |
| 277 | 283 |
| 278 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 284 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
| OLD | NEW |