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_GPU_CHANNEL_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 namespace gles2 { | 43 namespace gles2 { |
44 class SubscriptionRefSet; | 44 class SubscriptionRefSet; |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 namespace IPC { | 48 namespace IPC { |
49 class MessageFilter; | 49 class MessageFilter; |
50 } | 50 } |
51 | 51 |
52 namespace content { | 52 namespace content { |
53 class GpuArcAccelerator; | |
53 class GpuChannelManager; | 54 class GpuChannelManager; |
54 class GpuChannelMessageFilter; | 55 class GpuChannelMessageFilter; |
55 class GpuChannelMessageQueue; | 56 class GpuChannelMessageQueue; |
56 class GpuJpegDecodeAccelerator; | 57 class GpuJpegDecodeAccelerator; |
57 class GpuWatchdog; | 58 class GpuWatchdog; |
58 | 59 |
59 // Encapsulates an IPC channel between the GPU process and one renderer | 60 // Encapsulates an IPC channel between the GPU process and one renderer |
60 // process. On the renderer side there's a corresponding GpuChannelHost. | 61 // process. On the renderer side there's a corresponding GpuChannelHost. |
61 class CONTENT_EXPORT GpuChannel | 62 class CONTENT_EXPORT GpuChannel |
62 : public IPC::Listener, | 63 : public IPC::Listener, |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
221 void ScheduleHandleMessage(); | 222 void ScheduleHandleMessage(); |
222 | 223 |
223 // Message handlers. | 224 // Message handlers. |
224 void OnCreateOffscreenCommandBuffer( | 225 void OnCreateOffscreenCommandBuffer( |
225 const gfx::Size& size, | 226 const gfx::Size& size, |
226 const GPUCreateCommandBufferConfig& init_params, | 227 const GPUCreateCommandBufferConfig& init_params, |
227 int32 route_id, | 228 int32 route_id, |
228 bool* succeeded); | 229 bool* succeeded); |
229 void OnDestroyCommandBuffer(int32 route_id); | 230 void OnDestroyCommandBuffer(int32 route_id); |
230 void OnCreateJpegDecoder(int32 route_id, IPC::Message* reply_msg); | 231 void OnCreateJpegDecoder(int32 route_id, IPC::Message* reply_msg); |
232 void OnCreateArcAccelerator(uint32_t device_type); | |
233 void OnShutdownArcAccelerators(); | |
Owen Lin
2015/11/26 03:54:41
Can we route the message to GpuArcVideoService? On
kcwu
2015/11/26 10:34:42
No. This is for terminating GpuArcVideoService. Fo
| |
231 | 234 |
232 // The lifetime of objects of this class is managed by a GpuChannelManager. | 235 // The lifetime of objects of this class is managed by a GpuChannelManager. |
233 // The GpuChannelManager destroy all the GpuChannels that they own when they | 236 // The GpuChannelManager destroy all the GpuChannels that they own when they |
234 // are destroyed. So a raw pointer is safe. | 237 // are destroyed. So a raw pointer is safe. |
235 GpuChannelManager* gpu_channel_manager_; | 238 GpuChannelManager* gpu_channel_manager_; |
236 | 239 |
237 // Sync point manager. Outlives the channel and is guaranteed to outlive the | 240 // Sync point manager. Outlives the channel and is guaranteed to outlive the |
238 // message loop. | 241 // message loop. |
239 gpu::SyncPointManager* sync_point_manager_; | 242 gpu::SyncPointManager* sync_point_manager_; |
240 | 243 |
(...skipping 30 matching lines...) Expand all Loading... | |
271 scoped_refptr<gfx::GLShareGroup> share_group_; | 274 scoped_refptr<gfx::GLShareGroup> share_group_; |
272 | 275 |
273 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; | 276 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; |
274 | 277 |
275 scoped_refptr<gpu::gles2::SubscriptionRefSet> subscription_ref_set_; | 278 scoped_refptr<gpu::gles2::SubscriptionRefSet> subscription_ref_set_; |
276 | 279 |
277 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_; | 280 scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_; |
278 | 281 |
279 scoped_ptr<GpuJpegDecodeAccelerator> jpeg_decoder_; | 282 scoped_ptr<GpuJpegDecodeAccelerator> jpeg_decoder_; |
280 | 283 |
284 scoped_ptr<GpuArcAccelerator> arc_accelerator_; | |
Owen Lin
2015/11/26 03:54:41
Please consider move this to GpuProcess.
| |
285 | |
281 gpu::gles2::DisallowedFeatures disallowed_features_; | 286 gpu::gles2::DisallowedFeatures disallowed_features_; |
282 GpuWatchdog* watchdog_; | 287 GpuWatchdog* watchdog_; |
283 | 288 |
284 size_t num_stubs_descheduled_; | 289 size_t num_stubs_descheduled_; |
285 | 290 |
286 // Map of stream id to stream state. | 291 // Map of stream id to stream state. |
287 base::hash_map<int32, StreamState> streams_; | 292 base::hash_map<int32, StreamState> streams_; |
288 | 293 |
289 bool allow_future_sync_points_; | 294 bool allow_future_sync_points_; |
290 bool allow_real_time_streams_; | 295 bool allow_real_time_streams_; |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
468 base::WeakPtr<GpuChannel> gpu_channel_; | 473 base::WeakPtr<GpuChannel> gpu_channel_; |
469 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 474 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
470 gpu::SyncPointManager* sync_point_manager_; | 475 gpu::SyncPointManager* sync_point_manager_; |
471 | 476 |
472 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue); | 477 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue); |
473 }; | 478 }; |
474 | 479 |
475 } // namespace content | 480 } // namespace content |
476 | 481 |
477 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 482 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
OLD | NEW |