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/shared_memory.h" | 11 #include "base/shared_memory.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/common/gpu/gpu_memory_allocation.h" | 13 #include "content/common/gpu/gpu_memory_allocation.h" |
14 #include "content/common/gpu/gpu_process_launch_causes.h" | 14 #include "content/common/gpu/gpu_process_launch_causes.h" |
15 #include "content/public/common/common_param_traits.h" | 15 #include "content/public/common/common_param_traits.h" |
16 #include "content/public/common/gpu_info.h" | 16 #include "content/public/common/gpu_info.h" |
17 #include "content/public/common/gpu_memory_stats.h" | 17 #include "content/public/common/gpu_memory_stats.h" |
18 #include "content/public/common/gpu_rendering_stats.h" | |
18 #include "gpu/command_buffer/common/command_buffer.h" | 19 #include "gpu/command_buffer/common/command_buffer.h" |
19 #include "gpu/command_buffer/common/constants.h" | 20 #include "gpu/command_buffer/common/constants.h" |
20 #include "gpu/ipc/gpu_command_buffer_traits.h" | 21 #include "gpu/ipc/gpu_command_buffer_traits.h" |
21 #include "ipc/ipc_channel_handle.h" | 22 #include "ipc/ipc_channel_handle.h" |
22 #include "ipc/ipc_message_macros.h" | 23 #include "ipc/ipc_message_macros.h" |
23 #include "media/video/video_decode_accelerator.h" | 24 #include "media/video/video_decode_accelerator.h" |
24 #include "ui/gfx/native_widget_types.h" | 25 #include "ui/gfx/native_widget_types.h" |
25 #include "ui/gfx/size.h" | 26 #include "ui/gfx/size.h" |
26 #include "ui/gl/gpu_preference.h" | 27 #include "ui/gl/gpu_preference.h" |
27 #include "ui/surface/transport_dib.h" | 28 #include "ui/surface/transport_dib.h" |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
187 IPC_STRUCT_TRAITS_MEMBER(parent_texture_id[1]) | 188 IPC_STRUCT_TRAITS_MEMBER(parent_texture_id[1]) |
188 IPC_STRUCT_TRAITS_MEMBER(sync_point) | 189 IPC_STRUCT_TRAITS_MEMBER(sync_point) |
189 IPC_STRUCT_TRAITS_END() | 190 IPC_STRUCT_TRAITS_END() |
190 | 191 |
191 IPC_ENUM_TRAITS(content::CauseForGpuLaunch) | 192 IPC_ENUM_TRAITS(content::CauseForGpuLaunch) |
192 IPC_ENUM_TRAITS(gfx::GpuPreference) | 193 IPC_ENUM_TRAITS(gfx::GpuPreference) |
193 IPC_ENUM_TRAITS(gpu::error::ContextLostReason) | 194 IPC_ENUM_TRAITS(gpu::error::ContextLostReason) |
194 | 195 |
195 IPC_ENUM_TRAITS(media::VideoCodecProfile) | 196 IPC_ENUM_TRAITS(media::VideoCodecProfile) |
196 | 197 |
198 IPC_STRUCT_TRAITS_BEGIN(content::GpuRenderingStats) | |
199 IPC_STRUCT_TRAITS_MEMBER(globalTextureUploadCount) | |
200 IPC_STRUCT_TRAITS_MEMBER(globalTotalTextureUploadTimeInSeconds) | |
201 IPC_STRUCT_TRAITS_MEMBER(textureUploadCount) | |
202 IPC_STRUCT_TRAITS_MEMBER(totalTextureUploadTimeInSeconds) | |
203 IPC_STRUCT_TRAITS_END() | |
204 | |
197 //------------------------------------------------------------------------------ | 205 //------------------------------------------------------------------------------ |
198 // GPU Messages | 206 // GPU Messages |
199 // These are messages from the browser to the GPU process. | 207 // These are messages from the browser to the GPU process. |
200 | 208 |
201 // Tells the GPU process to initialize itself. The browser explicitly | 209 // Tells the GPU process to initialize itself. The browser explicitly |
202 // requests this be done so that we are guaranteed that the channel is set | 210 // requests this be done so that we are guaranteed that the channel is set |
203 // up between the browser and GPU process before doing any work that might | 211 // up between the browser and GPU process before doing any work that might |
204 // potentially crash the GPU process. Detection of the child process | 212 // potentially crash the GPU process. Detection of the child process |
205 // exiting abruptly is predicated on having the IPC channel set up. | 213 // exiting abruptly is predicated on having the IPC channel set up. |
206 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize) | 214 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize) |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
378 //------------------------------------------------------------------------------ | 386 //------------------------------------------------------------------------------ |
379 // Stream Texture Messages | 387 // Stream Texture Messages |
380 // Inform the renderer that a new frame is available. | 388 // Inform the renderer that a new frame is available. |
381 IPC_MESSAGE_ROUTED0(GpuStreamTextureMsg_FrameAvailable) | 389 IPC_MESSAGE_ROUTED0(GpuStreamTextureMsg_FrameAvailable) |
382 | 390 |
383 // Inform the renderer process that the transform matrix has changed. | 391 // Inform the renderer process that the transform matrix has changed. |
384 IPC_MESSAGE_ROUTED1(GpuStreamTextureMsg_MatrixChanged, | 392 IPC_MESSAGE_ROUTED1(GpuStreamTextureMsg_MatrixChanged, |
385 GpuStreamTextureMsg_MatrixChanged_Params /* params */) | 393 GpuStreamTextureMsg_MatrixChanged_Params /* params */) |
386 #endif | 394 #endif |
387 | 395 |
396 // Tells the GPU process to collect rendering stats. | |
397 IPC_SYNC_MESSAGE_CONTROL1_1(GpuChannelMsg_CollectRenderingStats, | |
apatrick_chromium
2012/08/28 20:07:06
Can you put these with the other GpuChannelMsg mes
| |
398 int32 /* surface_id */, | |
399 content::GpuRenderingStats /* stats */) | |
400 | |
388 //------------------------------------------------------------------------------ | 401 //------------------------------------------------------------------------------ |
389 // GPU Command Buffer Messages | 402 // GPU Command Buffer Messages |
390 // These are messages between a renderer process to the GPU process relating to | 403 // These are messages between a renderer process to the GPU process relating to |
391 // a single OpenGL context. | 404 // a single OpenGL context. |
392 // Initialize a command buffer with the given number of command entries. | 405 // Initialize a command buffer with the given number of command entries. |
393 // Returns the shared memory handle for the command buffer mapped to the | 406 // Returns the shared memory handle for the command buffer mapped to the |
394 // calling process. | 407 // calling process. |
395 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_Initialize, | 408 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_Initialize, |
396 bool /* result */) | 409 bool /* result */) |
397 | 410 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
605 | 618 |
606 // Confirm decoder has been flushed. | 619 // Confirm decoder has been flushed. |
607 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) | 620 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) |
608 | 621 |
609 // Confirm decoder has been reset. | 622 // Confirm decoder has been reset. |
610 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) | 623 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) |
611 | 624 |
612 // Video decoder has encountered an error. | 625 // Video decoder has encountered an error. |
613 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 626 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
614 uint32) /* Error ID */ | 627 uint32) /* Error ID */ |
OLD | NEW |