OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This header is meant to be included in multiple passes, hence no traditional | 5 // This header is meant to be included in multiple passes, hence no traditional |
6 // header guard. It is included by backing_store_messages_internal.h | 6 // header guard. It is included by backing_store_messages_internal.h |
7 // See ipc_message_macros.h for explanation of the macros and passes. | 7 // See ipc_message_macros.h for explanation of the macros and passes. |
8 | 8 |
9 // This file needs to be included again, even though we're actually included | 9 // This file needs to be included again, even though we're actually included |
10 // from it via utility_messages.h. | 10 // from it via utility_messages.h. |
11 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
| 12 #include "gfx/size.h" |
12 #include "ipc/ipc_channel_handle.h" | 13 #include "ipc/ipc_channel_handle.h" |
13 #include "ipc/ipc_message_macros.h" | 14 #include "ipc/ipc_message_macros.h" |
14 | 15 |
15 //------------------------------------------------------------------------------ | 16 //------------------------------------------------------------------------------ |
16 // GPU Messages | 17 // GPU Messages |
17 // These are messages from the browser to the GPU process. | 18 // These are messages from the browser to the GPU process. |
18 IPC_BEGIN_MESSAGES(Gpu) | 19 IPC_BEGIN_MESSAGES(Gpu) |
19 | 20 |
20 // Tells the GPU process to create a new channel for communication with a | 21 // Tells the GPU process to create a new channel for communication with a |
21 // given renderer. The channel name is returned in a | 22 // given renderer. The channel name is returned in a |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // Response to a GpuHostMsg_EstablishChannel message. | 90 // Response to a GpuHostMsg_EstablishChannel message. |
90 IPC_MESSAGE_CONTROL1(GpuHostMsg_ChannelEstablished, | 91 IPC_MESSAGE_CONTROL1(GpuHostMsg_ChannelEstablished, |
91 IPC::ChannelHandle /* channel_handle */) | 92 IPC::ChannelHandle /* channel_handle */) |
92 IPC_END_MESSAGES(GpuHost) | 93 IPC_END_MESSAGES(GpuHost) |
93 | 94 |
94 //------------------------------------------------------------------------------ | 95 //------------------------------------------------------------------------------ |
95 // GPU Channel Messages | 96 // GPU Channel Messages |
96 // These are messages from a renderer process to the GPU process. | 97 // These are messages from a renderer process to the GPU process. |
97 IPC_BEGIN_MESSAGES(GpuChannel) | 98 IPC_BEGIN_MESSAGES(GpuChannel) |
98 | 99 |
99 // Tells the GPU process to create a new command buffer with the given | 100 // Tells the GPU process to create a new command buffer that renders directly |
100 // id. A corresponding GpuCommandBufferStub is created. | 101 // to a native view. A corresponding GpuCommandBufferStub is created. |
101 IPC_SYNC_MESSAGE_CONTROL0_1(GpuChannelMsg_CreateCommandBuffer, | 102 IPC_SYNC_MESSAGE_CONTROL1_1(GpuChannelMsg_CreateViewCommandBuffer, |
| 103 gfx::NativeViewId, /* view */ |
| 104 int32 /* route_id */) |
| 105 |
| 106 // Tells the GPU process to create a new command buffer that renders to an |
| 107 // offscreen frame buffer. If parent_route_id is not zero, the texture backing |
| 108 // the frame buffer is mapped into the corresponding parent command buffer's |
| 109 // namespace, with the name of parent_texture_id. This ID is in the parent's |
| 110 // namespace. |
| 111 IPC_SYNC_MESSAGE_CONTROL3_1(GpuChannelMsg_CreateOffscreenCommandBuffer, |
| 112 int32, /* parent_route_id */ |
| 113 gfx::Size, /* size */ |
| 114 uint32, /* parent_texture_id */ |
102 int32 /* route_id */) | 115 int32 /* route_id */) |
103 | 116 |
104 // The CommandBufferProxy sends this to the GpuCommandBufferStub in its | 117 // The CommandBufferProxy sends this to the GpuCommandBufferStub in its |
105 // destructor, so that the stub deletes the actual WebPluginDelegateImpl | 118 // destructor, so that the stub deletes the actual WebPluginDelegateImpl |
106 // object that it's hosting. | 119 // object that it's hosting. |
107 // TODO(apatrick): Implement this. | 120 // TODO(apatrick): Implement this. |
108 IPC_MESSAGE_CONTROL1(GpuChannelMsg_DestroyCommandBuffer, | 121 IPC_MESSAGE_CONTROL1(GpuChannelMsg_DestroyCommandBuffer, |
109 int32 /* instance_id */) | 122 int32 /* instance_id */) |
110 | 123 |
111 IPC_END_MESSAGES(GpuChannel) | 124 IPC_END_MESSAGES(GpuChannel) |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 // process. | 174 // process. |
162 IPC_SYNC_MESSAGE_ROUTED1_2(GpuCommandBufferMsg_GetTransferBuffer, | 175 IPC_SYNC_MESSAGE_ROUTED1_2(GpuCommandBufferMsg_GetTransferBuffer, |
163 int32 /* id */, | 176 int32 /* id */, |
164 base::SharedMemoryHandle /* transfer_buffer */, | 177 base::SharedMemoryHandle /* transfer_buffer */, |
165 uint32 /* size */) | 178 uint32 /* size */) |
166 | 179 |
167 // Send from command buffer stub to proxy when window is invalid and must be | 180 // Send from command buffer stub to proxy when window is invalid and must be |
168 // repainted. | 181 // repainted. |
169 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_NotifyRepaint) | 182 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_NotifyRepaint) |
170 | 183 |
| 184 // Tells the GPU process to resize an offscreen frame buffer. |
| 185 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_ResizeOffscreenFrameBuffer, |
| 186 gfx::Size /* size */) |
| 187 |
171 #if defined(OS_MACOSX) | 188 #if defined(OS_MACOSX) |
172 // On Mac OS X the GPU plugin must be offscreen, because there is no | 189 // On Mac OS X the GPU plugin must be offscreen, because there is no |
173 // true cross-process window hierarchy. For this reason we must send | 190 // true cross-process window hierarchy. For this reason we must send |
174 // resize events explicitly to the command buffer stub so it can | 191 // resize events explicitly to the command buffer stub so it can |
175 // reallocate its backing store and send the new one back to the | 192 // reallocate its backing store and send the new one back to the |
176 // browser. This message is currently used only on 10.6 and later. | 193 // browser. This message is currently used only on 10.6 and later. |
177 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_SetWindowSize, | 194 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_SetWindowSize, |
178 int32 /* width */, | 195 int32 /* width */, |
179 int32 /* height */) | 196 int32 /* height */) |
180 #endif | 197 #endif |
181 | 198 |
182 IPC_END_MESSAGES(GpuCommandBuffer) | 199 IPC_END_MESSAGES(GpuCommandBuffer) |
OLD | NEW |