| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 IPC_STRUCT_TRAITS_MEMBER(gl_renderer) | 95 IPC_STRUCT_TRAITS_MEMBER(gl_renderer) |
| 96 IPC_STRUCT_TRAITS_MEMBER(gl_extensions) | 96 IPC_STRUCT_TRAITS_MEMBER(gl_extensions) |
| 97 IPC_STRUCT_TRAITS_MEMBER(can_lose_context) | 97 IPC_STRUCT_TRAITS_MEMBER(can_lose_context) |
| 98 #if defined(OS_WIN) | 98 #if defined(OS_WIN) |
| 99 IPC_STRUCT_TRAITS_MEMBER(dx_diagnostics) | 99 IPC_STRUCT_TRAITS_MEMBER(dx_diagnostics) |
| 100 #endif | 100 #endif |
| 101 IPC_STRUCT_TRAITS_END() | 101 IPC_STRUCT_TRAITS_END() |
| 102 | 102 |
| 103 IPC_ENUM_TRAITS(content::CauseForGpuLaunch) | 103 IPC_ENUM_TRAITS(content::CauseForGpuLaunch) |
| 104 IPC_ENUM_TRAITS(gpu::error::ContextLostReason) | 104 IPC_ENUM_TRAITS(gpu::error::ContextLostReason) |
| 105 IPC_ENUM_TRAITS(gpu::resource_type::ResourceType) | |
| 106 | 105 |
| 107 //------------------------------------------------------------------------------ | 106 //------------------------------------------------------------------------------ |
| 108 // GPU Messages | 107 // GPU Messages |
| 109 // These are messages from the browser to the GPU process. | 108 // These are messages from the browser to the GPU process. |
| 110 | 109 |
| 111 // Tells the GPU process to initialize itself. The browser explicitly | 110 // Tells the GPU process to initialize itself. The browser explicitly |
| 112 // requests this be done so that we are guaranteed that the channel is set | 111 // requests this be done so that we are guaranteed that the channel is set |
| 113 // up between the browser and GPU process before doing any work that might | 112 // up between the browser and GPU process before doing any work that might |
| 114 // potentially crash the GPU process. Detection of the child process | 113 // potentially crash the GPU process. Detection of the child process |
| 115 // exiting abruptly is predicated on having the IPC channel set up. | 114 // exiting abruptly is predicated on having the IPC channel set up. |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 // These are messages between a renderer process to the GPU process relating to | 311 // These are messages between a renderer process to the GPU process relating to |
| 313 // a single OpenGL context. | 312 // a single OpenGL context. |
| 314 // Initialize a command buffer with the given number of command entries. | 313 // Initialize a command buffer with the given number of command entries. |
| 315 // Returns the shared memory handle for the command buffer mapped to the | 314 // Returns the shared memory handle for the command buffer mapped to the |
| 316 // calling process. | 315 // calling process. |
| 317 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_Initialize, | 316 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_Initialize, |
| 318 base::SharedMemoryHandle /* ring_buffer */, | 317 base::SharedMemoryHandle /* ring_buffer */, |
| 319 int32 /* size */, | 318 int32 /* size */, |
| 320 bool /* result */) | 319 bool /* result */) |
| 321 | 320 |
| 322 | |
| 323 // Map a resource from an external context into this context. The source | |
| 324 // context need not be in the same share group from the client's point of | |
| 325 // view, allowing safe sharing between an "untrusted" context, like Pepper | |
| 326 // and a compositor context. | |
| 327 // | |
| 328 // Currently only texture resources are supported. TODO(apatrick): generalize | |
| 329 // this as appropriate. | |
| 330 // | |
| 331 // To unmap a previously mapped external resource, delete it in the | |
| 332 // destination context group. This will not delete the underlying texture | |
| 333 // object, just disassociate it with the id in the destination context group. | |
| 334 // | |
| 335 // The lifetime of the external resource is managed by the context group it | |
| 336 // was originally created in. When the last context in that group is destroyed | |
| 337 // the resource becomes invalid in all other context groups it is mapped into. | |
| 338 IPC_MESSAGE_ROUTED4(GpuCommandBufferMsg_MapExternalResource, | |
| 339 gpu::resource_type::ResourceType /* resource_type */, | |
| 340 uint32 /* resource_source_id */, | |
| 341 int32 /* source_route_id */, | |
| 342 uint32 /* resource_dest_id */) | |
| 343 | |
| 344 // Sets the parent command buffer. This allows the parent and child to share | 321 // Sets the parent command buffer. This allows the parent and child to share |
| 345 // textures. | 322 // textures. |
| 346 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_SetParent, | 323 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_SetParent, |
| 347 int32 /* parent_route_id */, | 324 int32 /* parent_route_id */, |
| 348 uint32 /* parent_texture_id */, | 325 uint32 /* parent_texture_id */, |
| 349 bool /* result */) | 326 bool /* result */) |
| 350 | 327 |
| 351 // Get the current state of the command buffer. | 328 // Get the current state of the command buffer. |
| 352 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_GetState, | 329 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_GetState, |
| 353 gpu::CommandBuffer::State /* state */) | 330 gpu::CommandBuffer::State /* state */) |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 | 511 |
| 535 // Confirm decoder has been reset. | 512 // Confirm decoder has been reset. |
| 536 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) | 513 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) |
| 537 | 514 |
| 538 // Decoder has faced end of stream marker in the stream. | 515 // Decoder has faced end of stream marker in the stream. |
| 539 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream) | 516 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream) |
| 540 | 517 |
| 541 // Video decoder has encountered an error. | 518 // Video decoder has encountered an error. |
| 542 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 519 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
| 543 uint32) /* Error ID */ | 520 uint32) /* Error ID */ |
| OLD | NEW |