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/scoped_ptr_hash_map.h" | 12 #include "base/containers/scoped_ptr_hash_map.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/attachment_broker.h" | |
24 #include "ipc/ipc_channel_handle.h" | 23 #include "ipc/ipc_channel_handle.h" |
25 #include "ipc/ipc_sync_channel.h" | 24 #include "ipc/ipc_sync_channel.h" |
26 #include "ipc/message_filter.h" | 25 #include "ipc/message_filter.h" |
27 #include "media/video/jpeg_decode_accelerator.h" | 26 #include "media/video/jpeg_decode_accelerator.h" |
28 #include "ui/events/latency_info.h" | 27 #include "ui/events/latency_info.h" |
29 #include "ui/gfx/geometry/size.h" | 28 #include "ui/gfx/geometry/size.h" |
30 #include "ui/gfx/gpu_memory_buffer.h" | 29 #include "ui/gfx/gpu_memory_buffer.h" |
31 #include "ui/gfx/native_widget_types.h" | 30 #include "ui/gfx/native_widget_types.h" |
32 #include "ui/gl/gpu_preference.h" | 31 #include "ui/gl/gpu_preference.h" |
33 | 32 |
(...skipping 17 matching lines...) Expand all Loading... |
51 } | 50 } |
52 | 51 |
53 namespace gpu { | 52 namespace gpu { |
54 class GpuMemoryBufferManager; | 53 class GpuMemoryBufferManager; |
55 } | 54 } |
56 | 55 |
57 namespace content { | 56 namespace content { |
58 class CommandBufferProxyImpl; | 57 class CommandBufferProxyImpl; |
59 class GpuChannelHost; | 58 class GpuChannelHost; |
60 | 59 |
61 class CONTENT_EXPORT GpuChannelHostFactory | 60 class CONTENT_EXPORT GpuChannelHostFactory { |
62 : virtual public IPC::SupportsAttachmentBrokering { | |
63 public: | 61 public: |
64 virtual ~GpuChannelHostFactory() {} | 62 virtual ~GpuChannelHostFactory() {} |
65 | 63 |
66 virtual bool IsMainThread() = 0; | 64 virtual bool IsMainThread() = 0; |
67 virtual scoped_refptr<base::SingleThreadTaskRunner> | 65 virtual scoped_refptr<base::SingleThreadTaskRunner> |
68 GetIOThreadTaskRunner() = 0; | 66 GetIOThreadTaskRunner() = 0; |
69 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0; | 67 virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0; |
70 virtual CreateCommandBufferResult CreateViewCommandBuffer( | 68 virtual CreateCommandBufferResult CreateViewCommandBuffer( |
71 int32 surface_id, | 69 int32 surface_id, |
72 const GPUCreateCommandBufferConfig& init_params, | 70 const GPUCreateCommandBufferConfig& init_params, |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 mutable base::Lock context_lock_; | 276 mutable base::Lock context_lock_; |
279 scoped_ptr<IPC::SyncChannel> channel_; | 277 scoped_ptr<IPC::SyncChannel> channel_; |
280 base::hash_map<int32, StreamFlushInfo> stream_flush_info_; | 278 base::hash_map<int32, StreamFlushInfo> stream_flush_info_; |
281 | 279 |
282 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 280 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
283 }; | 281 }; |
284 | 282 |
285 } // namespace content | 283 } // namespace content |
286 | 284 |
287 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 285 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
OLD | NEW |