| 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 // 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/shared_memory.h" | 11 #include "base/memory/shared_memory.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "content/common/content_param_traits.h" | 13 #include "content/common/content_param_traits.h" |
| 14 #include "content/common/gpu/gpu_memory_uma_stats.h" | 14 #include "content/common/gpu/gpu_memory_uma_stats.h" |
| 15 #include "content/common/gpu/gpu_process_launch_causes.h" | 15 #include "content/common/gpu/gpu_process_launch_causes.h" |
| 16 #include "content/common/gpu/gpu_result_codes.h" | 16 #include "content/common/gpu/gpu_result_codes.h" |
| 17 #include "content/common/gpu/gpu_stream_priority.h" | 17 #include "content/common/gpu/gpu_stream_priority.h" |
| 18 #include "content/public/common/common_param_traits.h" | 18 #include "content/public/common/common_param_traits.h" |
| 19 #include "content/public/common/gpu_memory_stats.h" | 19 #include "content/public/common/gpu_memory_stats.h" |
| 20 #include "gpu/command_buffer/common/capabilities.h" | 20 #include "gpu/command_buffer/common/capabilities.h" |
| 21 #include "gpu/command_buffer/common/command_buffer.h" | 21 #include "gpu/command_buffer/common/command_buffer.h" |
| 22 #include "gpu/command_buffer/common/constants.h" | 22 #include "gpu/command_buffer/common/constants.h" |
| 23 #include "gpu/command_buffer/common/gpu_memory_allocation.h" | 23 #include "gpu/command_buffer/common/gpu_memory_allocation.h" |
| 24 #include "gpu/command_buffer/common/mailbox.h" | 24 #include "gpu/command_buffer/common/mailbox.h" |
| 25 #include "gpu/command_buffer/common/value_state.h" | 25 #include "gpu/command_buffer/common/value_state.h" |
| 26 #include "gpu/config/gpu_info.h" | 26 #include "gpu/config/gpu_info.h" |
| 27 #include "gpu/ipc/gpu_command_buffer_traits.h" | 27 #include "gpu/ipc/gpu_command_buffer_traits.h" |
| 28 #include "ipc/ipc_channel_handle.h" | 28 #include "ipc/ipc_channel_handle.h" |
| 29 #include "ipc/ipc_message_macros.h" | 29 #include "ipc/ipc_message_macros.h" |
| 30 #include "media/base/decrypt_config.h" |
| 30 #include "media/base/video_types.h" | 31 #include "media/base/video_types.h" |
| 31 #include "media/video/jpeg_decode_accelerator.h" | 32 #include "media/video/jpeg_decode_accelerator.h" |
| 32 #include "media/video/video_decode_accelerator.h" | 33 #include "media/video/video_decode_accelerator.h" |
| 33 #include "media/video/video_encode_accelerator.h" | 34 #include "media/video/video_encode_accelerator.h" |
| 34 #include "ui/events/latency_info.h" | 35 #include "ui/events/latency_info.h" |
| 35 #include "ui/gfx/geometry/size.h" | 36 #include "ui/gfx/geometry/size.h" |
| 36 #include "ui/gfx/gpu_memory_buffer.h" | 37 #include "ui/gfx/gpu_memory_buffer.h" |
| 37 #include "ui/gfx/ipc/gfx_param_traits.h" | 38 #include "ui/gfx/ipc/gfx_param_traits.h" |
| 38 #include "ui/gfx/native_widget_types.h" | 39 #include "ui/gfx/native_widget_types.h" |
| 39 #include "ui/gfx/swap_result.h" | 40 #include "ui/gfx/swap_result.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 141 |
| 141 IPC_STRUCT_BEGIN(AcceleratedJpegDecoderMsg_Decode_Params) | 142 IPC_STRUCT_BEGIN(AcceleratedJpegDecoderMsg_Decode_Params) |
| 142 IPC_STRUCT_MEMBER(int32, input_buffer_id) | 143 IPC_STRUCT_MEMBER(int32, input_buffer_id) |
| 143 IPC_STRUCT_MEMBER(gfx::Size, coded_size) | 144 IPC_STRUCT_MEMBER(gfx::Size, coded_size) |
| 144 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, input_buffer_handle) | 145 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, input_buffer_handle) |
| 145 IPC_STRUCT_MEMBER(uint32, input_buffer_size) | 146 IPC_STRUCT_MEMBER(uint32, input_buffer_size) |
| 146 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, output_video_frame_handle) | 147 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, output_video_frame_handle) |
| 147 IPC_STRUCT_MEMBER(uint32, output_buffer_size) | 148 IPC_STRUCT_MEMBER(uint32, output_buffer_size) |
| 148 IPC_STRUCT_END() | 149 IPC_STRUCT_END() |
| 149 | 150 |
| 151 IPC_STRUCT_BEGIN(AcceleratedVideoDecoderMsg_Decode_Params) |
| 152 IPC_STRUCT_MEMBER(int32, bitstream_buffer_id) |
| 153 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, buffer_handle) |
| 154 IPC_STRUCT_MEMBER(uint32, size) |
| 155 IPC_STRUCT_MEMBER(base::TimeDelta, presentation_timestamp) |
| 156 IPC_STRUCT_MEMBER(std::string, key_id) |
| 157 IPC_STRUCT_MEMBER(std::string, iv) |
| 158 IPC_STRUCT_MEMBER(std::vector<media::SubsampleEntry>, subsamples) |
| 159 IPC_STRUCT_END() |
| 160 |
| 150 IPC_STRUCT_BEGIN(AcceleratedVideoEncoderMsg_Encode_Params) | 161 IPC_STRUCT_BEGIN(AcceleratedVideoEncoderMsg_Encode_Params) |
| 151 IPC_STRUCT_MEMBER(int32_t, frame_id) | 162 IPC_STRUCT_MEMBER(int32_t, frame_id) |
| 152 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, buffer_handle) | 163 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, buffer_handle) |
| 153 IPC_STRUCT_MEMBER(uint32_t, buffer_offset) | 164 IPC_STRUCT_MEMBER(uint32_t, buffer_offset) |
| 154 IPC_STRUCT_MEMBER(uint32_t, buffer_size) | 165 IPC_STRUCT_MEMBER(uint32_t, buffer_size) |
| 155 IPC_STRUCT_MEMBER(bool, force_keyframe) | 166 IPC_STRUCT_MEMBER(bool, force_keyframe) |
| 156 IPC_STRUCT_END() | 167 IPC_STRUCT_END() |
| 157 | 168 |
| 158 IPC_STRUCT_BEGIN(GPUCommandBufferConsoleMessage) | 169 IPC_STRUCT_BEGIN(GPUCommandBufferConsoleMessage) |
| 159 IPC_STRUCT_MEMBER(int32, id) | 170 IPC_STRUCT_MEMBER(int32, id) |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 IPC_STRUCT_TRAITS_BEGIN(gpu::MemoryAllocation) | 279 IPC_STRUCT_TRAITS_BEGIN(gpu::MemoryAllocation) |
| 269 IPC_STRUCT_TRAITS_MEMBER(bytes_limit_when_visible) | 280 IPC_STRUCT_TRAITS_MEMBER(bytes_limit_when_visible) |
| 270 IPC_STRUCT_TRAITS_MEMBER(priority_cutoff_when_visible) | 281 IPC_STRUCT_TRAITS_MEMBER(priority_cutoff_when_visible) |
| 271 IPC_STRUCT_TRAITS_END() | 282 IPC_STRUCT_TRAITS_END() |
| 272 | 283 |
| 273 IPC_STRUCT_TRAITS_BEGIN(gfx::GLSurfaceHandle) | 284 IPC_STRUCT_TRAITS_BEGIN(gfx::GLSurfaceHandle) |
| 274 IPC_STRUCT_TRAITS_MEMBER(handle) | 285 IPC_STRUCT_TRAITS_MEMBER(handle) |
| 275 IPC_STRUCT_TRAITS_MEMBER(transport_type) | 286 IPC_STRUCT_TRAITS_MEMBER(transport_type) |
| 276 IPC_STRUCT_TRAITS_END() | 287 IPC_STRUCT_TRAITS_END() |
| 277 | 288 |
| 289 IPC_STRUCT_TRAITS_BEGIN(media::SubsampleEntry) |
| 290 IPC_STRUCT_TRAITS_MEMBER(clear_bytes) |
| 291 IPC_STRUCT_TRAITS_MEMBER(cypher_bytes) |
| 292 IPC_STRUCT_TRAITS_END() |
| 293 |
| 278 //------------------------------------------------------------------------------ | 294 //------------------------------------------------------------------------------ |
| 279 // GPU Messages | 295 // GPU Messages |
| 280 // These are messages from the browser to the GPU process. | 296 // These are messages from the browser to the GPU process. |
| 281 | 297 |
| 282 // Tells the GPU process to initialize itself. The browser explicitly | 298 // Tells the GPU process to initialize itself. The browser explicitly |
| 283 // requests this be done so that we are guaranteed that the channel is set | 299 // requests this be done so that we are guaranteed that the channel is set |
| 284 // up between the browser and GPU process before doing any work that might | 300 // up between the browser and GPU process before doing any work that might |
| 285 // potentially crash the GPU process. Detection of the child process | 301 // potentially crash the GPU process. Detection of the child process |
| 286 // exiting abruptly is predicated on having the IPC channel set up. | 302 // exiting abruptly is predicated on having the IPC channel set up. |
| 287 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize) | 303 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize) |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_CreateStreamTexture, | 671 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_CreateStreamTexture, |
| 656 uint32, /* client_texture_id */ | 672 uint32, /* client_texture_id */ |
| 657 int32, /* stream_id */ | 673 int32, /* stream_id */ |
| 658 bool /* succeeded */) | 674 bool /* succeeded */) |
| 659 | 675 |
| 660 //------------------------------------------------------------------------------ | 676 //------------------------------------------------------------------------------ |
| 661 // Accelerated Video Decoder Messages | 677 // Accelerated Video Decoder Messages |
| 662 // These messages are sent from Renderer process to GPU process. | 678 // These messages are sent from Renderer process to GPU process. |
| 663 | 679 |
| 664 // Send input buffer for decoding. | 680 // Send input buffer for decoding. |
| 665 IPC_MESSAGE_ROUTED4(AcceleratedVideoDecoderMsg_Decode, | 681 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_Decode, |
| 666 base::SharedMemoryHandle, /* input_buffer_handle */ | 682 AcceleratedVideoDecoderMsg_Decode_Params) |
| 667 int32, /* bitstream_buffer_id */ | |
| 668 uint32, /* size */ | |
| 669 base::TimeDelta) /* presentation_timestamp */ | |
| 670 | 683 |
| 671 // Sent from Renderer process to the GPU process to give the texture IDs for | 684 // Sent from Renderer process to the GPU process to give the texture IDs for |
| 672 // the textures the decoder will use for output. | 685 // the textures the decoder will use for output. |
| 673 IPC_MESSAGE_ROUTED2(AcceleratedVideoDecoderMsg_AssignPictureBuffers, | 686 IPC_MESSAGE_ROUTED2(AcceleratedVideoDecoderMsg_AssignPictureBuffers, |
| 674 std::vector<int32>, /* Picture buffer ID */ | 687 std::vector<int32>, /* Picture buffer ID */ |
| 675 std::vector<uint32>) /* Texture ID */ | 688 std::vector<uint32>) /* Texture ID */ |
| 676 | 689 |
| 677 // Send from Renderer process to the GPU process to recycle the given picture | 690 // Send from Renderer process to the GPU process to recycle the given picture |
| 678 // buffer for further decoding. | 691 // buffer for further decoding. |
| 679 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_ReusePictureBuffer, | 692 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_ReusePictureBuffer, |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy) | 807 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy) |
| 795 | 808 |
| 796 //------------------------------------------------------------------------------ | 809 //------------------------------------------------------------------------------ |
| 797 // Accelerated JPEG Decoder Host Messages | 810 // Accelerated JPEG Decoder Host Messages |
| 798 // These messages are sent from the GPU process to Browser process. | 811 // These messages are sent from the GPU process to Browser process. |
| 799 // | 812 // |
| 800 // Report decode status. | 813 // Report decode status. |
| 801 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck, | 814 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck, |
| 802 int32, /* bitstream_buffer_id */ | 815 int32, /* bitstream_buffer_id */ |
| 803 media::JpegDecodeAccelerator::Error /* error */) | 816 media::JpegDecodeAccelerator::Error /* error */) |
| OLD | NEW |