OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Multiply-included message file, hence no include guard here, but see below | 5 // Multiply-included message file, hence no include guard here, but see below |
6 // for a much smaller-than-usual include guard section. | 6 // for a much smaller-than-usual include guard section. |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
12 #include "content/common/common_param_traits.h" | 12 #include "content/common/common_param_traits.h" |
13 #include "content/common/gpu/gpu_info.h" | 13 #include "content/common/gpu/gpu_info.h" |
14 #include "content/common/gpu/gpu_process_launch_causes.h" | 14 #include "content/common/gpu/gpu_process_launch_causes.h" |
15 #include "gpu/command_buffer/common/command_buffer.h" | 15 #include "gpu/command_buffer/common/command_buffer.h" |
16 #include "gpu/command_buffer/common/constants.h" | 16 #include "gpu/command_buffer/common/constants.h" |
17 #include "gpu/ipc/gpu_command_buffer_traits.h" | 17 #include "gpu/ipc/gpu_command_buffer_traits.h" |
18 #include "ipc/ipc_channel_handle.h" | 18 #include "ipc/ipc_channel_handle.h" |
19 #include "ipc/ipc_message_macros.h" | 19 #include "ipc/ipc_message_macros.h" |
| 20 #include "media/video/video_decode_accelerator.h" |
20 #include "ui/gfx/native_widget_types.h" | 21 #include "ui/gfx/native_widget_types.h" |
21 #include "ui/gfx/size.h" | 22 #include "ui/gfx/size.h" |
22 | 23 |
23 #define IPC_MESSAGE_START GpuMsgStart | 24 #define IPC_MESSAGE_START GpuMsgStart |
24 | 25 |
25 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) | 26 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) |
26 IPC_STRUCT_MEMBER(int32, share_group_id) | 27 IPC_STRUCT_MEMBER(int32, share_group_id) |
27 IPC_STRUCT_MEMBER(std::string, allowed_extensions) | 28 IPC_STRUCT_MEMBER(std::string, allowed_extensions) |
28 IPC_STRUCT_MEMBER(std::vector<int>, attribs) | 29 IPC_STRUCT_MEMBER(std::vector<int>, attribs) |
29 IPC_STRUCT_MEMBER(GURL, active_url) | 30 IPC_STRUCT_MEMBER(GURL, active_url) |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 IPC_STRUCT_TRAITS_MEMBER(gl_extensions) | 98 IPC_STRUCT_TRAITS_MEMBER(gl_extensions) |
98 IPC_STRUCT_TRAITS_MEMBER(can_lose_context) | 99 IPC_STRUCT_TRAITS_MEMBER(can_lose_context) |
99 #if defined(OS_WIN) | 100 #if defined(OS_WIN) |
100 IPC_STRUCT_TRAITS_MEMBER(dx_diagnostics) | 101 IPC_STRUCT_TRAITS_MEMBER(dx_diagnostics) |
101 #endif | 102 #endif |
102 IPC_STRUCT_TRAITS_END() | 103 IPC_STRUCT_TRAITS_END() |
103 | 104 |
104 IPC_ENUM_TRAITS(content::CauseForGpuLaunch) | 105 IPC_ENUM_TRAITS(content::CauseForGpuLaunch) |
105 IPC_ENUM_TRAITS(gpu::error::ContextLostReason) | 106 IPC_ENUM_TRAITS(gpu::error::ContextLostReason) |
106 | 107 |
| 108 IPC_ENUM_TRAITS(media::VideoDecodeAccelerator::Config::Format) |
| 109 IPC_ENUM_TRAITS(media::VideoDecodeAccelerator::Config::H264Profile) |
| 110 IPC_STRUCT_TRAITS_BEGIN(media::VideoDecodeAccelerator::Config) |
| 111 IPC_STRUCT_TRAITS_MEMBER(format) |
| 112 IPC_STRUCT_TRAITS_MEMBER(h264_profile) |
| 113 IPC_STRUCT_TRAITS_END() |
| 114 |
107 //------------------------------------------------------------------------------ | 115 //------------------------------------------------------------------------------ |
108 // GPU Messages | 116 // GPU Messages |
109 // These are messages from the browser to the GPU process. | 117 // These are messages from the browser to the GPU process. |
110 | 118 |
111 // Tells the GPU process to initialize itself. The browser explicitly | 119 // Tells the GPU process to initialize itself. The browser explicitly |
112 // requests this be done so that we are guaranteed that the channel is set | 120 // requests this be done so that we are guaranteed that the channel is set |
113 // up between the browser and GPU process before doing any work that might | 121 // up between the browser and GPU process before doing any work that might |
114 // potentially crash the GPU process. Detection of the child process | 122 // potentially crash the GPU process. Detection of the child process |
115 // exiting abruptly is predicated on having the IPC channel set up. | 123 // exiting abruptly is predicated on having the IPC channel set up. |
116 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize) | 124 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize) |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 | 390 |
383 // Get the shared memory handle for a transfer buffer mapped to the callers | 391 // Get the shared memory handle for a transfer buffer mapped to the callers |
384 // process. | 392 // process. |
385 IPC_SYNC_MESSAGE_ROUTED1_2(GpuCommandBufferMsg_GetTransferBuffer, | 393 IPC_SYNC_MESSAGE_ROUTED1_2(GpuCommandBufferMsg_GetTransferBuffer, |
386 int32 /* id */, | 394 int32 /* id */, |
387 base::SharedMemoryHandle /* transfer_buffer */, | 395 base::SharedMemoryHandle /* transfer_buffer */, |
388 uint32 /* size */) | 396 uint32 /* size */) |
389 | 397 |
390 // Create and initialize a hardware video decoder, returning its new route_id. | 398 // Create and initialize a hardware video decoder, returning its new route_id. |
391 IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateVideoDecoder, | 399 IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateVideoDecoder, |
392 std::vector<int32> /* configs */, | 400 media::VideoDecodeAccelerator::Config /* config */, |
393 int /* route_id */) | 401 int /* route_id */) |
394 | 402 |
395 // Release all resources held by the named hardware video decoder. | 403 // Release all resources held by the named hardware video decoder. |
396 IPC_SYNC_MESSAGE_ROUTED1_0(GpuCommandBufferMsg_DestroyVideoDecoder, | 404 IPC_SYNC_MESSAGE_ROUTED1_0(GpuCommandBufferMsg_DestroyVideoDecoder, |
397 int /* route_id */) | 405 int /* route_id */) |
398 | 406 |
399 // Send from command buffer stub to proxy when window is invalid and must be | 407 // Send from command buffer stub to proxy when window is invalid and must be |
400 // repainted. | 408 // repainted. |
401 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_NotifyRepaint) | 409 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_NotifyRepaint) |
402 | 410 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 | 525 |
518 // Confirm decoder has been reset. | 526 // Confirm decoder has been reset. |
519 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) | 527 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) |
520 | 528 |
521 // Decoder has faced end of stream marker in the stream. | 529 // Decoder has faced end of stream marker in the stream. |
522 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream) | 530 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream) |
523 | 531 |
524 // Video decoder has encountered an error. | 532 // Video decoder has encountered an error. |
525 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 533 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
526 uint32) /* Error ID */ | 534 uint32) /* Error ID */ |
OLD | NEW |