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. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 GPUInfo /* GPU logging stats */) | 96 GPUInfo /* GPU logging stats */) |
97 | 97 |
98 // Response to a GpuMsg_Synchronize message. | 98 // Response to a GpuMsg_Synchronize message. |
99 IPC_MESSAGE_CONTROL0(GpuHostMsg_SynchronizeReply) | 99 IPC_MESSAGE_CONTROL0(GpuHostMsg_SynchronizeReply) |
100 | 100 |
101 #if defined(OS_LINUX) | 101 #if defined(OS_LINUX) |
102 // Get the XID for a view ID. | 102 // Get the XID for a view ID. |
103 IPC_SYNC_MESSAGE_CONTROL1_1(GpuHostMsg_GetViewXID, | 103 IPC_SYNC_MESSAGE_CONTROL1_1(GpuHostMsg_GetViewXID, |
104 gfx::NativeViewId, /* view */ | 104 gfx::NativeViewId, /* view */ |
105 unsigned long /* xid */) | 105 unsigned long /* xid */) |
| 106 #elif defined(OS_MACOSX) |
| 107 // This message, used on Mac OS X 10.6 and later (where IOSurface is |
| 108 // supported), is sent from the GPU process to the browser to indicate that a |
| 109 // new backing store was allocated for the given "window" (fake |
| 110 // PluginWindowHandle). The renderer ID and render view ID are needed in |
| 111 // order to uniquely identify the RenderWidgetHostView on the browser side. |
| 112 IPC_MESSAGE_CONTROL1(GpuHostMsg_AcceleratedSurfaceSetIOSurface, |
| 113 GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params) |
| 114 |
| 115 // This message notifies the browser process that the renderer |
| 116 // swapped the buffers associated with the given "window", which |
| 117 // should cause the browser to redraw the compositor's contents. |
| 118 IPC_MESSAGE_CONTROL3(GpuHostMsg_AcceleratedSurfaceBuffersSwapped, |
| 119 int32, /* renderer_id */ |
| 120 int32, /* render_view_id */ |
| 121 gfx::PluginWindowHandle /* window */) |
106 #endif | 122 #endif |
107 | 123 |
108 IPC_END_MESSAGES(GpuHost) | 124 IPC_END_MESSAGES(GpuHost) |
109 | 125 |
110 //------------------------------------------------------------------------------ | 126 //------------------------------------------------------------------------------ |
111 // GPU Channel Messages | 127 // GPU Channel Messages |
112 // These are messages from a renderer process to the GPU process. | 128 // These are messages from a renderer process to the GPU process. |
113 IPC_BEGIN_MESSAGES(GpuChannel) | 129 IPC_BEGIN_MESSAGES(GpuChannel) |
114 | 130 |
115 // Tells the GPU process to create a new command buffer that renders directly | 131 // Tells the GPU process to create a new command buffer that renders directly |
116 // to a native view. A corresponding GpuCommandBufferStub is created. | 132 // to a native view. The |render_view_id| is currently needed only on Mac OS |
117 IPC_SYNC_MESSAGE_CONTROL1_1(GpuChannelMsg_CreateViewCommandBuffer, | 133 // X in order to identify the window on the browser side into which the |
| 134 // rendering results go. A corresponding GpuCommandBufferStub is created. |
| 135 IPC_SYNC_MESSAGE_CONTROL2_1(GpuChannelMsg_CreateViewCommandBuffer, |
118 gfx::NativeViewId, /* view */ | 136 gfx::NativeViewId, /* view */ |
| 137 int32, /* render_view_id */ |
119 int32 /* route_id */) | 138 int32 /* route_id */) |
120 | 139 |
121 // Tells the GPU process to create a new command buffer that renders to an | 140 // Tells the GPU process to create a new command buffer that renders to an |
122 // offscreen frame buffer. If parent_route_id is not zero, the texture backing | 141 // offscreen frame buffer. If parent_route_id is not zero, the texture backing |
123 // the frame buffer is mapped into the corresponding parent command buffer's | 142 // the frame buffer is mapped into the corresponding parent command buffer's |
124 // namespace, with the name of parent_texture_id. This ID is in the parent's | 143 // namespace, with the name of parent_texture_id. This ID is in the parent's |
125 // namespace. | 144 // namespace. |
126 IPC_SYNC_MESSAGE_CONTROL3_1(GpuChannelMsg_CreateOffscreenCommandBuffer, | 145 IPC_SYNC_MESSAGE_CONTROL3_1(GpuChannelMsg_CreateOffscreenCommandBuffer, |
127 int32, /* parent_route_id */ | 146 int32, /* parent_route_id */ |
128 gfx::Size, /* size */ | 147 gfx::Size, /* size */ |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 int32 /* put_offset */, | 183 int32 /* put_offset */, |
165 gpu::CommandBuffer::State /* state */) | 184 gpu::CommandBuffer::State /* state */) |
166 | 185 |
167 // Asynchronously synchronize the put and get offsets of both processes. | 186 // Asynchronously synchronize the put and get offsets of both processes. |
168 // Caller passes its current put offset. Current state (including get offset) | 187 // Caller passes its current put offset. Current state (including get offset) |
169 // is returned via an UpdateState message. | 188 // is returned via an UpdateState message. |
170 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_AsyncFlush, | 189 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_AsyncFlush, |
171 int32 /* put_offset */) | 190 int32 /* put_offset */) |
172 | 191 |
173 // Return the current state of the command buffer following a request via | 192 // Return the current state of the command buffer following a request via |
174 // an AsyncGetState or AsyncFlush message. | 193 // an AsyncGetState or AsyncFlush message. (This message is sent from the |
| 194 // GPU process to the renderer process.) |
175 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_UpdateState, | 195 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_UpdateState, |
176 gpu::CommandBuffer::State /* state */) | 196 gpu::CommandBuffer::State /* state */) |
177 | 197 |
178 // Create a shared memory transfer buffer. Returns an id that can be used to | 198 // Create a shared memory transfer buffer. Returns an id that can be used to |
179 // identify the transfer buffer from a comment. | 199 // identify the transfer buffer from a comment. |
180 IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateTransferBuffer, | 200 IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateTransferBuffer, |
181 int32 /* size */, | 201 int32 /* size */, |
182 int32 /* id */) | 202 int32 /* id */) |
183 | 203 |
184 // Destroy a previously created transfer buffer. | 204 // Destroy a previously created transfer buffer. |
(...skipping 16 matching lines...) Expand all Loading... |
201 gfx::Size /* size */) | 221 gfx::Size /* size */) |
202 | 222 |
203 #if defined(OS_MACOSX) | 223 #if defined(OS_MACOSX) |
204 // On Mac OS X the GPU plugin must be offscreen, because there is no | 224 // On Mac OS X the GPU plugin must be offscreen, because there is no |
205 // true cross-process window hierarchy. For this reason we must send | 225 // true cross-process window hierarchy. For this reason we must send |
206 // resize events explicitly to the command buffer stub so it can | 226 // resize events explicitly to the command buffer stub so it can |
207 // reallocate its backing store and send the new one back to the | 227 // reallocate its backing store and send the new one back to the |
208 // browser. This message is currently used only on 10.6 and later. | 228 // browser. This message is currently used only on 10.6 and later. |
209 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetWindowSize, | 229 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetWindowSize, |
210 gfx::Size /* size */) | 230 gfx::Size /* size */) |
| 231 |
| 232 // This message is sent from the GPU process to the renderer process (and |
| 233 // from there the browser process) that the buffers associated with the |
| 234 // given "window" were swapped, which should cause the browser to redraw |
| 235 // the various accelerated surfaces. |
| 236 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_AcceleratedSurfaceBuffersSwapped, |
| 237 gfx::PluginWindowHandle /* window */) |
211 #endif | 238 #endif |
212 | 239 |
213 IPC_END_MESSAGES(GpuCommandBuffer) | 240 IPC_END_MESSAGES(GpuCommandBuffer) |
OLD | NEW |