| 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 <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/gpu/gpu_process_launch_causes.h" | 12 #include "content/common/gpu/gpu_process_launch_causes.h" |
| 13 #include "content/public/common/common_param_traits.h" | 13 #include "content/public/common/common_param_traits.h" |
| 14 #include "content/public/common/gpu_info.h" | 14 #include "content/public/common/gpu_info.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 "media/video/video_decode_accelerator.h" |
| 21 #include "ui/gfx/gl/gl_surface.h" |
| 21 #include "ui/gfx/gl/gpu_preference.h" | 22 #include "ui/gfx/gl/gpu_preference.h" |
| 22 #include "ui/gfx/native_widget_types.h" | 23 #include "ui/gfx/native_widget_types.h" |
| 23 #include "ui/gfx/size.h" | 24 #include "ui/gfx/size.h" |
| 24 #include "ui/gfx/surface/transport_dib.h" | 25 #include "ui/gfx/surface/transport_dib.h" |
| 25 | 26 |
| 26 #define IPC_MESSAGE_START GpuMsgStart | 27 #define IPC_MESSAGE_START GpuMsgStart |
| 27 | 28 |
| 28 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) | 29 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) |
| 29 IPC_STRUCT_MEMBER(int32, share_group_id) | 30 IPC_STRUCT_MEMBER(int32, share_group_id) |
| 30 IPC_STRUCT_MEMBER(std::string, allowed_extensions) | 31 IPC_STRUCT_MEMBER(std::string, allowed_extensions) |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 #if defined(OS_WIN) | 112 #if defined(OS_WIN) |
| 112 IPC_STRUCT_TRAITS_MEMBER(dx_diagnostics) | 113 IPC_STRUCT_TRAITS_MEMBER(dx_diagnostics) |
| 113 #endif | 114 #endif |
| 114 IPC_STRUCT_TRAITS_END() | 115 IPC_STRUCT_TRAITS_END() |
| 115 | 116 |
| 116 IPC_ENUM_TRAITS(content::CauseForGpuLaunch) | 117 IPC_ENUM_TRAITS(content::CauseForGpuLaunch) |
| 117 IPC_ENUM_TRAITS(gfx::GpuPreference) | 118 IPC_ENUM_TRAITS(gfx::GpuPreference) |
| 118 IPC_ENUM_TRAITS(gpu::error::ContextLostReason) | 119 IPC_ENUM_TRAITS(gpu::error::ContextLostReason) |
| 119 | 120 |
| 120 IPC_ENUM_TRAITS(media::VideoDecodeAccelerator::Profile) | 121 IPC_ENUM_TRAITS(media::VideoDecodeAccelerator::Profile) |
| 122 IPC_ENUM_TRAITS(gfx::GLSurface::ResourceUsage) |
| 121 | 123 |
| 122 //------------------------------------------------------------------------------ | 124 //------------------------------------------------------------------------------ |
| 123 // GPU Messages | 125 // GPU Messages |
| 124 // These are messages from the browser to the GPU process. | 126 // These are messages from the browser to the GPU process. |
| 125 | 127 |
| 126 // Tells the GPU process to initialize itself. The browser explicitly | 128 // Tells the GPU process to initialize itself. The browser explicitly |
| 127 // requests this be done so that we are guaranteed that the channel is set | 129 // requests this be done so that we are guaranteed that the channel is set |
| 128 // up between the browser and GPU process before doing any work that might | 130 // up between the browser and GPU process before doing any work that might |
| 129 // potentially crash the GPU process. Detection of the child process | 131 // potentially crash the GPU process. Detection of the child process |
| 130 // exiting abruptly is predicated on having the IPC channel set up. | 132 // exiting abruptly is predicated on having the IPC channel set up. |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 #endif | 408 #endif |
| 407 | 409 |
| 408 // Tells the proxy that there was an error and the command buffer had to be | 410 // Tells the proxy that there was an error and the command buffer had to be |
| 409 // destroyed for some reason. | 411 // destroyed for some reason. |
| 410 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Destroyed, | 412 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Destroyed, |
| 411 gpu::error::ContextLostReason /* reason */) | 413 gpu::error::ContextLostReason /* reason */) |
| 412 | 414 |
| 413 // Response to a GpuChannelMsg_Echo message. | 415 // Response to a GpuChannelMsg_Echo message. |
| 414 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_EchoAck) | 416 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_EchoAck) |
| 415 | 417 |
| 416 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetSurfaceVisible, bool /* visible */) | 418 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetResourceUsage, |
| 419 gfx::GLSurface::ResourceUsage /* resourceUsage */) |
| 417 | 420 |
| 418 //------------------------------------------------------------------------------ | 421 //------------------------------------------------------------------------------ |
| 419 // Accelerated Video Decoder Messages | 422 // Accelerated Video Decoder Messages |
| 420 // These messages are sent from Renderer process to GPU process. | 423 // These messages are sent from Renderer process to GPU process. |
| 421 | 424 |
| 422 // Send input buffer for decoding. | 425 // Send input buffer for decoding. |
| 423 IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderMsg_Decode, | 426 IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderMsg_Decode, |
| 424 base::SharedMemoryHandle, /* input_buffer_handle */ | 427 base::SharedMemoryHandle, /* input_buffer_handle */ |
| 425 int32, /* bitstream_buffer_id */ | 428 int32, /* bitstream_buffer_id */ |
| 426 int32) /* size */ | 429 int32) /* size */ |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 | 476 |
| 474 // Confirm decoder has been flushed. | 477 // Confirm decoder has been flushed. |
| 475 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) | 478 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) |
| 476 | 479 |
| 477 // Confirm decoder has been reset. | 480 // Confirm decoder has been reset. |
| 478 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) | 481 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) |
| 479 | 482 |
| 480 // Video decoder has encountered an error. | 483 // Video decoder has encountered an error. |
| 481 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 484 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
| 482 uint32) /* Error ID */ | 485 uint32) /* Error ID */ |
| OLD | NEW |