| 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 "gpu/command_buffer/common/command_buffer.h" | 17 #include "gpu/command_buffer/common/command_buffer.h" |
| 18 #include "gpu/command_buffer/common/constants.h" | 18 #include "gpu/command_buffer/common/constants.h" |
| 19 #include "gpu/ipc/gpu_command_buffer_traits.h" | 19 #include "gpu/ipc/gpu_command_buffer_traits.h" |
| 20 #include "ipc/ipc_channel_handle.h" | 20 #include "ipc/ipc_channel_handle.h" |
| 21 #include "ipc/ipc_message_macros.h" | 21 #include "ipc/ipc_message_macros.h" |
| 22 #include "media/video/video_decode_accelerator.h" | 22 #include "media/video/video_decode_accelerator.h" |
| 23 #include "ui/gfx/native_widget_types.h" | 23 #include "ui/gfx/native_widget_types.h" |
| 24 #include "ui/gfx/size.h" | 24 #include "ui/gfx/size.h" |
| 25 #include "ui/gl/gpu_preference.h" | 25 #include "ui/gl/gpu_preference.h" |
| 26 #include "ui/surface/transport_dib.h" | 26 #include "ui/surface/transport_dib.h" |
| 27 | 27 |
| 28 #if defined(OS_ANDROID) |
| 29 #include "content/common/android/surface_texture_peer.h" |
| 30 #endif |
| 31 |
| 28 #define IPC_MESSAGE_START GpuMsgStart | 32 #define IPC_MESSAGE_START GpuMsgStart |
| 29 | 33 |
| 30 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) | 34 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) |
| 31 IPC_STRUCT_MEMBER(int32, share_group_id) | 35 IPC_STRUCT_MEMBER(int32, share_group_id) |
| 32 IPC_STRUCT_MEMBER(std::string, allowed_extensions) | 36 IPC_STRUCT_MEMBER(std::string, allowed_extensions) |
| 33 IPC_STRUCT_MEMBER(std::vector<int>, attribs) | 37 IPC_STRUCT_MEMBER(std::vector<int>, attribs) |
| 34 IPC_STRUCT_MEMBER(GURL, active_url) | 38 IPC_STRUCT_MEMBER(GURL, active_url) |
| 35 IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference) | 39 IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference) |
| 36 IPC_STRUCT_END() | 40 IPC_STRUCT_END() |
| 37 | 41 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 #if defined(OS_MACOSX) | 86 #if defined(OS_MACOSX) |
| 83 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window) | 87 IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, window) |
| 84 #endif | 88 #endif |
| 85 IPC_STRUCT_END() | 89 IPC_STRUCT_END() |
| 86 | 90 |
| 87 IPC_STRUCT_BEGIN(GPUCommandBufferConsoleMessage) | 91 IPC_STRUCT_BEGIN(GPUCommandBufferConsoleMessage) |
| 88 IPC_STRUCT_MEMBER(int32, id) | 92 IPC_STRUCT_MEMBER(int32, id) |
| 89 IPC_STRUCT_MEMBER(std::string, message) | 93 IPC_STRUCT_MEMBER(std::string, message) |
| 90 IPC_STRUCT_END() | 94 IPC_STRUCT_END() |
| 91 | 95 |
| 96 #if defined(OS_ANDROID) |
| 97 IPC_STRUCT_BEGIN(GpuStreamTextureMsg_MatrixChanged_Params) |
| 98 IPC_STRUCT_MEMBER(float, m00) |
| 99 IPC_STRUCT_MEMBER(float, m01) |
| 100 IPC_STRUCT_MEMBER(float, m02) |
| 101 IPC_STRUCT_MEMBER(float, m03) |
| 102 IPC_STRUCT_MEMBER(float, m10) |
| 103 IPC_STRUCT_MEMBER(float, m11) |
| 104 IPC_STRUCT_MEMBER(float, m12) |
| 105 IPC_STRUCT_MEMBER(float, m13) |
| 106 IPC_STRUCT_MEMBER(float, m20) |
| 107 IPC_STRUCT_MEMBER(float, m21) |
| 108 IPC_STRUCT_MEMBER(float, m22) |
| 109 IPC_STRUCT_MEMBER(float, m23) |
| 110 IPC_STRUCT_MEMBER(float, m30) |
| 111 IPC_STRUCT_MEMBER(float, m31) |
| 112 IPC_STRUCT_MEMBER(float, m32) |
| 113 IPC_STRUCT_MEMBER(float, m33) |
| 114 IPC_STRUCT_END() |
| 115 IPC_ENUM_TRAITS(content::SurfaceTexturePeer::SurfaceTextureTarget) |
| 116 #endif |
| 117 |
| 92 IPC_STRUCT_TRAITS_BEGIN(content::DxDiagNode) | 118 IPC_STRUCT_TRAITS_BEGIN(content::DxDiagNode) |
| 93 IPC_STRUCT_TRAITS_MEMBER(values) | 119 IPC_STRUCT_TRAITS_MEMBER(values) |
| 94 IPC_STRUCT_TRAITS_MEMBER(children) | 120 IPC_STRUCT_TRAITS_MEMBER(children) |
| 95 IPC_STRUCT_TRAITS_END() | 121 IPC_STRUCT_TRAITS_END() |
| 96 | 122 |
| 97 IPC_STRUCT_TRAITS_BEGIN(content::GpuPerformanceStats) | 123 IPC_STRUCT_TRAITS_BEGIN(content::GpuPerformanceStats) |
| 98 IPC_STRUCT_TRAITS_MEMBER(graphics) | 124 IPC_STRUCT_TRAITS_MEMBER(graphics) |
| 99 IPC_STRUCT_TRAITS_MEMBER(gaming) | 125 IPC_STRUCT_TRAITS_MEMBER(gaming) |
| 100 IPC_STRUCT_TRAITS_MEMBER(overall) | 126 IPC_STRUCT_TRAITS_MEMBER(overall) |
| 101 IPC_STRUCT_TRAITS_END() | 127 IPC_STRUCT_TRAITS_END() |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 gfx::Size, /* size */ | 330 gfx::Size, /* size */ |
| 305 GPUCreateCommandBufferConfig, /* init_params */ | 331 GPUCreateCommandBufferConfig, /* init_params */ |
| 306 int32 /* route_id */) | 332 int32 /* route_id */) |
| 307 | 333 |
| 308 // The CommandBufferProxy sends this to the GpuCommandBufferStub in its | 334 // The CommandBufferProxy sends this to the GpuCommandBufferStub in its |
| 309 // destructor, so that the stub deletes the actual CommandBufferService | 335 // destructor, so that the stub deletes the actual CommandBufferService |
| 310 // object that it's hosting. | 336 // object that it's hosting. |
| 311 IPC_SYNC_MESSAGE_CONTROL1_0(GpuChannelMsg_DestroyCommandBuffer, | 337 IPC_SYNC_MESSAGE_CONTROL1_0(GpuChannelMsg_DestroyCommandBuffer, |
| 312 int32 /* instance_id */) | 338 int32 /* instance_id */) |
| 313 | 339 |
| 340 |
| 341 #if defined(OS_ANDROID) |
| 342 // Register the StreamTextureProxy class with the GPU process, so that |
| 343 // the renderer process will get notified whenever a frame becomes available. |
| 344 IPC_SYNC_MESSAGE_CONTROL2_1(GpuChannelMsg_RegisterStreamTextureProxy, |
| 345 int32, /* stream_id */ |
| 346 gfx::Size, /* initial_size */ |
| 347 int /* route_id */) |
| 348 |
| 349 // Tells the GPU process create and send the java surface texture object to |
| 350 // the renderer process through the binder thread. |
| 351 IPC_MESSAGE_CONTROL4(GpuChannelMsg_EstablishStreamTexture, |
| 352 int32, /* stream_id */ |
| 353 content::SurfaceTexturePeer::SurfaceTextureTarget, |
| 354 /* type */ |
| 355 int32, /* primary_id */ |
| 356 int32 /* secondary_id */) |
| 357 |
| 358 //------------------------------------------------------------------------------ |
| 359 // Stream Texture Messages |
| 360 // Inform the renderer that a new frame is available. |
| 361 IPC_MESSAGE_ROUTED0(GpuStreamTextureMsg_FrameAvailable) |
| 362 |
| 363 // Inform the renderer process that the transform matrix has changed. |
| 364 IPC_MESSAGE_ROUTED1(GpuStreamTextureMsg_MatrixChanged, |
| 365 GpuStreamTextureMsg_MatrixChanged_Params /* params */) |
| 366 #endif |
| 367 |
| 314 //------------------------------------------------------------------------------ | 368 //------------------------------------------------------------------------------ |
| 315 // GPU Command Buffer Messages | 369 // GPU Command Buffer Messages |
| 316 // These are messages between a renderer process to the GPU process relating to | 370 // These are messages between a renderer process to the GPU process relating to |
| 317 // a single OpenGL context. | 371 // a single OpenGL context. |
| 318 // Initialize a command buffer with the given number of command entries. | 372 // Initialize a command buffer with the given number of command entries. |
| 319 // Returns the shared memory handle for the command buffer mapped to the | 373 // Returns the shared memory handle for the command buffer mapped to the |
| 320 // calling process. | 374 // calling process. |
| 321 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_Initialize, | 375 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_Initialize, |
| 322 bool /* result */) | 376 bool /* result */) |
| 323 | 377 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 | 585 |
| 532 // Confirm decoder has been flushed. | 586 // Confirm decoder has been flushed. |
| 533 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) | 587 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) |
| 534 | 588 |
| 535 // Confirm decoder has been reset. | 589 // Confirm decoder has been reset. |
| 536 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) | 590 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) |
| 537 | 591 |
| 538 // Video decoder has encountered an error. | 592 // Video decoder has encountered an error. |
| 539 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 593 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
| 540 uint32) /* Error ID */ | 594 uint32) /* Error ID */ |
| OLD | NEW |