| 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(global_texture_upload_count) |
| 200 IPC_STRUCT_TRAITS_MEMBER(global_total_texture_upload_time) |
| 201 IPC_STRUCT_TRAITS_MEMBER(texture_upload_count) |
| 202 IPC_STRUCT_TRAITS_MEMBER(total_texture_upload_time) |
| 203 IPC_STRUCT_TRAITS_MEMBER(global_total_processing_commands_time) |
| 204 IPC_STRUCT_TRAITS_MEMBER(total_processing_commands_time) |
| 205 IPC_STRUCT_TRAITS_END() |
| 206 |
| 197 //------------------------------------------------------------------------------ | 207 //------------------------------------------------------------------------------ |
| 198 // GPU Messages | 208 // GPU Messages |
| 199 // These are messages from the browser to the GPU process. | 209 // These are messages from the browser to the GPU process. |
| 200 | 210 |
| 201 // Tells the GPU process to initialize itself. The browser explicitly | 211 // 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 | 212 // 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 | 213 // up between the browser and GPU process before doing any work that might |
| 204 // potentially crash the GPU process. Detection of the child process | 214 // potentially crash the GPU process. Detection of the child process |
| 205 // exiting abruptly is predicated on having the IPC channel set up. | 215 // exiting abruptly is predicated on having the IPC channel set up. |
| 206 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize) | 216 IPC_MESSAGE_CONTROL0(GpuMsg_Initialize) |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 int /* route_id */) | 381 int /* route_id */) |
| 372 | 382 |
| 373 // Tells the GPU process create and send the java surface texture object to | 383 // Tells the GPU process create and send the java surface texture object to |
| 374 // the renderer process through the binder thread. | 384 // the renderer process through the binder thread. |
| 375 IPC_MESSAGE_CONTROL4(GpuChannelMsg_EstablishStreamTexture, | 385 IPC_MESSAGE_CONTROL4(GpuChannelMsg_EstablishStreamTexture, |
| 376 int32, /* stream_id */ | 386 int32, /* stream_id */ |
| 377 content::SurfaceTexturePeer::SurfaceTextureTarget, | 387 content::SurfaceTexturePeer::SurfaceTextureTarget, |
| 378 /* type */ | 388 /* type */ |
| 379 int32, /* primary_id */ | 389 int32, /* primary_id */ |
| 380 int32 /* secondary_id */) | 390 int32 /* secondary_id */) |
| 391 #endif |
| 381 | 392 |
| 393 // Tells the GPU process to collect rendering stats. |
| 394 IPC_SYNC_MESSAGE_CONTROL1_1(GpuChannelMsg_CollectRenderingStatsForSurface, |
| 395 int32 /* surface_id */, |
| 396 content::GpuRenderingStats /* stats */) |
| 397 |
| 398 #if defined(OS_ANDROID) |
| 382 //------------------------------------------------------------------------------ | 399 //------------------------------------------------------------------------------ |
| 383 // Stream Texture Messages | 400 // Stream Texture Messages |
| 384 // Inform the renderer that a new frame is available. | 401 // Inform the renderer that a new frame is available. |
| 385 IPC_MESSAGE_ROUTED0(GpuStreamTextureMsg_FrameAvailable) | 402 IPC_MESSAGE_ROUTED0(GpuStreamTextureMsg_FrameAvailable) |
| 386 | 403 |
| 387 // Inform the renderer process that the transform matrix has changed. | 404 // Inform the renderer process that the transform matrix has changed. |
| 388 IPC_MESSAGE_ROUTED1(GpuStreamTextureMsg_MatrixChanged, | 405 IPC_MESSAGE_ROUTED1(GpuStreamTextureMsg_MatrixChanged, |
| 389 GpuStreamTextureMsg_MatrixChanged_Params /* params */) | 406 GpuStreamTextureMsg_MatrixChanged_Params /* params */) |
| 390 #endif | 407 #endif |
| 391 | 408 |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 | 626 |
| 610 // Confirm decoder has been flushed. | 627 // Confirm decoder has been flushed. |
| 611 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) | 628 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) |
| 612 | 629 |
| 613 // Confirm decoder has been reset. | 630 // Confirm decoder has been reset. |
| 614 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) | 631 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) |
| 615 | 632 |
| 616 // Video decoder has encountered an error. | 633 // Video decoder has encountered an error. |
| 617 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 634 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
| 618 uint32) /* Error ID */ | 635 uint32) /* Error ID */ |
| OLD | NEW |