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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 #if defined(OS_WIN) | 108 #if defined(OS_WIN) |
108 IPC_STRUCT_TRAITS_MEMBER(dx_diagnostics) | 109 IPC_STRUCT_TRAITS_MEMBER(dx_diagnostics) |
109 #endif | 110 #endif |
110 IPC_STRUCT_TRAITS_END() | 111 IPC_STRUCT_TRAITS_END() |
111 | 112 |
112 IPC_ENUM_TRAITS(content::CauseForGpuLaunch) | 113 IPC_ENUM_TRAITS(content::CauseForGpuLaunch) |
113 IPC_ENUM_TRAITS(gfx::GpuPreference) | 114 IPC_ENUM_TRAITS(gfx::GpuPreference) |
114 IPC_ENUM_TRAITS(gpu::error::ContextLostReason) | 115 IPC_ENUM_TRAITS(gpu::error::ContextLostReason) |
115 | 116 |
116 IPC_ENUM_TRAITS(media::VideoDecodeAccelerator::Profile) | 117 IPC_ENUM_TRAITS(media::VideoDecodeAccelerator::Profile) |
| 118 IPC_ENUM_TRAITS(gfx::GLSurface::ResourceUsage) |
117 | 119 |
118 //------------------------------------------------------------------------------ | 120 //------------------------------------------------------------------------------ |
119 // GPU Messages | 121 // GPU Messages |
120 // These are messages from the browser to the GPU process. | 122 // These are messages from the browser to the GPU process. |
121 | 123 |
122 // Tells the GPU process to initialize itself. The browser explicitly | 124 // Tells the GPU process to initialize itself. The browser explicitly |
123 // requests this be done so that we are guaranteed that the channel is set | 125 // requests this be done so that we are guaranteed that the channel is set |
124 // up between the browser and GPU process before doing any work that might | 126 // up between the browser and GPU process before doing any work that might |
125 // potentially crash the GPU process. Detection of the child process | 127 // potentially crash the GPU process. Detection of the child process |
126 // exiting abruptly is predicated on having the IPC channel set up. | 128 // exiting abruptly is predicated on having the IPC channel set up. |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 #endif | 401 #endif |
400 | 402 |
401 // Tells the proxy that there was an error and the command buffer had to be | 403 // Tells the proxy that there was an error and the command buffer had to be |
402 // destroyed for some reason. | 404 // destroyed for some reason. |
403 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Destroyed, | 405 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Destroyed, |
404 gpu::error::ContextLostReason /* reason */) | 406 gpu::error::ContextLostReason /* reason */) |
405 | 407 |
406 // Response to a GpuChannelMsg_Echo message. | 408 // Response to a GpuChannelMsg_Echo message. |
407 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_EchoAck) | 409 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_EchoAck) |
408 | 410 |
409 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetSurfaceVisible, bool /* visible */) | 411 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetResourceUsage, |
| 412 gfx::GLSurface::ResourceUsage /* resourceUsage */) |
410 | 413 |
411 //------------------------------------------------------------------------------ | 414 //------------------------------------------------------------------------------ |
412 // Accelerated Video Decoder Messages | 415 // Accelerated Video Decoder Messages |
413 // These messages are sent from Renderer process to GPU process. | 416 // These messages are sent from Renderer process to GPU process. |
414 | 417 |
415 // Send input buffer for decoding. | 418 // Send input buffer for decoding. |
416 IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderMsg_Decode, | 419 IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderMsg_Decode, |
417 base::SharedMemoryHandle, /* input_buffer_handle */ | 420 base::SharedMemoryHandle, /* input_buffer_handle */ |
418 int32, /* bitstream_buffer_id */ | 421 int32, /* bitstream_buffer_id */ |
419 int32) /* size */ | 422 int32) /* size */ |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 | 469 |
467 // Confirm decoder has been flushed. | 470 // Confirm decoder has been flushed. |
468 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) | 471 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) |
469 | 472 |
470 // Confirm decoder has been reset. | 473 // Confirm decoder has been reset. |
471 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) | 474 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) |
472 | 475 |
473 // Video decoder has encountered an error. | 476 // Video decoder has encountered an error. |
474 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 477 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
475 uint32) /* Error ID */ | 478 uint32) /* Error ID */ |
OLD | NEW |