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) |
105 | 106 |
106 //------------------------------------------------------------------------------ | 107 //------------------------------------------------------------------------------ |
107 // GPU Messages | 108 // GPU Messages |
108 // These are messages from the browser to the GPU process. | 109 // These are messages from the browser to the GPU process. |
109 | 110 |
110 // Tells the GPU process to initialize itself. The browser explicitly | 111 // Tells the GPU process to initialize itself. The browser explicitly |
111 // requests this be done so that we are guaranteed that the channel is set | 112 // requests this be done so that we are guaranteed that the channel is set |
112 // up between the browser and GPU process before doing any work that might | 113 // up between the browser and GPU process before doing any work that might |
113 // potentially crash the GPU process. Detection of the child process | 114 // potentially crash the GPU process. Detection of the child process |
114 // exiting abruptly is predicated on having the IPC channel set up. | 115 // exiting abruptly is predicated on having the IPC channel set up. |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 // These are messages between a renderer process to the GPU process relating to | 312 // These are messages between a renderer process to the GPU process relating to |
312 // a single OpenGL context. | 313 // a single OpenGL context. |
313 // Initialize a command buffer with the given number of command entries. | 314 // Initialize a command buffer with the given number of command entries. |
314 // Returns the shared memory handle for the command buffer mapped to the | 315 // Returns the shared memory handle for the command buffer mapped to the |
315 // calling process. | 316 // calling process. |
316 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_Initialize, | 317 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_Initialize, |
317 base::SharedMemoryHandle /* ring_buffer */, | 318 base::SharedMemoryHandle /* ring_buffer */, |
318 int32 /* size */, | 319 int32 /* size */, |
319 bool /* result */) | 320 bool /* result */) |
320 | 321 |
| 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 |
321 // Sets the parent command buffer. This allows the parent and child to share | 344 // Sets the parent command buffer. This allows the parent and child to share |
322 // textures. | 345 // textures. |
323 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_SetParent, | 346 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_SetParent, |
324 int32 /* parent_route_id */, | 347 int32 /* parent_route_id */, |
325 uint32 /* parent_texture_id */, | 348 uint32 /* parent_texture_id */, |
326 bool /* result */) | 349 bool /* result */) |
327 | 350 |
328 // Get the current state of the command buffer. | 351 // Get the current state of the command buffer. |
329 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_GetState, | 352 IPC_SYNC_MESSAGE_ROUTED0_1(GpuCommandBufferMsg_GetState, |
330 gpu::CommandBuffer::State /* state */) | 353 gpu::CommandBuffer::State /* state */) |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 | 537 |
515 // Confirm decoder has been reset. | 538 // Confirm decoder has been reset. |
516 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) | 539 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) |
517 | 540 |
518 // Decoder has faced end of stream marker in the stream. | 541 // Decoder has faced end of stream marker in the stream. |
519 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream) | 542 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream) |
520 | 543 |
521 // Video decoder has encountered an error. | 544 // Video decoder has encountered an error. |
522 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 545 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
523 uint32) /* Error ID */ | 546 uint32) /* Error ID */ |
OLD | NEW |