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 "chrome/common/gpu_info.h" | 12 #include "chrome/common/gpu_info.h" |
| 13 #include "chrome/common/gpu_video_common.h" |
13 #include "gfx/size.h" | 14 #include "gfx/size.h" |
14 #include "ipc/ipc_channel_handle.h" | 15 #include "ipc/ipc_channel_handle.h" |
15 #include "ipc/ipc_message_macros.h" | 16 #include "ipc/ipc_message_macros.h" |
16 | 17 |
17 //------------------------------------------------------------------------------ | 18 //------------------------------------------------------------------------------ |
18 // GPU Messages | 19 // GPU Messages |
19 // These are messages from the browser to the GPU process. | 20 // These are messages from the browser to the GPU process. |
20 IPC_BEGIN_MESSAGES(Gpu) | 21 IPC_BEGIN_MESSAGES(Gpu) |
21 | 22 |
22 // Tells the GPU process to create a new channel for communication with a | 23 // Tells the GPU process to create a new channel for communication with a |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 uint32, /* parent_texture_id */ | 149 uint32, /* parent_texture_id */ |
149 int32 /* route_id */) | 150 int32 /* route_id */) |
150 | 151 |
151 // The CommandBufferProxy sends this to the GpuCommandBufferStub in its | 152 // The CommandBufferProxy sends this to the GpuCommandBufferStub in its |
152 // destructor, so that the stub deletes the actual WebPluginDelegateImpl | 153 // destructor, so that the stub deletes the actual WebPluginDelegateImpl |
153 // object that it's hosting. | 154 // object that it's hosting. |
154 // TODO(apatrick): Implement this. | 155 // TODO(apatrick): Implement this. |
155 IPC_MESSAGE_CONTROL1(GpuChannelMsg_DestroyCommandBuffer, | 156 IPC_MESSAGE_CONTROL1(GpuChannelMsg_DestroyCommandBuffer, |
156 int32 /* instance_id */) | 157 int32 /* instance_id */) |
157 | 158 |
| 159 // Get hardware video service routing id. |
| 160 IPC_SYNC_MESSAGE_CONTROL0_1(GpuChannelMsg_GetVideoService, |
| 161 GpuVideoServiceInfoParam) |
| 162 |
| 163 // Create hardware video decoder && associate it with the output |decoder_id|; |
| 164 // We need this to be control message because we had to map the GpuChannel and |
| 165 // |decoder_id|. |
| 166 IPC_SYNC_MESSAGE_CONTROL0_1(GpuChannelMsg_CreateVideoDecoder, |
| 167 GpuVideoDecoderInfoParam) |
| 168 |
| 169 // Release all resource of the hardware video decoder which was assocaited |
| 170 // with the input |decoder_id|. |
| 171 IPC_SYNC_MESSAGE_CONTROL1_0(GpuChannelMsg_DestroyVideoDecoder, |
| 172 int32 /* decoder_id */) |
| 173 |
158 IPC_END_MESSAGES(GpuChannel) | 174 IPC_END_MESSAGES(GpuChannel) |
159 | 175 |
160 //------------------------------------------------------------------------------ | 176 //------------------------------------------------------------------------------ |
161 // GPU Command Buffer Messages | 177 // GPU Command Buffer Messages |
162 // These are messages between a renderer process to the GPU process relating to | 178 // These are messages between a renderer process to the GPU process relating to |
163 // a single OpenGL context. | 179 // a single OpenGL context. |
164 IPC_BEGIN_MESSAGES(GpuCommandBuffer) | 180 IPC_BEGIN_MESSAGES(GpuCommandBuffer) |
165 // Initialize a command buffer with the given number of command entries. | 181 // Initialize a command buffer with the given number of command entries. |
166 // Returns the shared memory handle for the command buffer mapped to the | 182 // Returns the shared memory handle for the command buffer mapped to the |
167 // calling process. | 183 // calling process. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 250 |
235 // This message is sent from the GPU process to the renderer process (and | 251 // This message is sent from the GPU process to the renderer process (and |
236 // from there the browser process) that the buffers associated with the | 252 // from there the browser process) that the buffers associated with the |
237 // given "window" were swapped, which should cause the browser to redraw | 253 // given "window" were swapped, which should cause the browser to redraw |
238 // the various accelerated surfaces. | 254 // the various accelerated surfaces. |
239 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_AcceleratedSurfaceBuffersSwapped, | 255 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_AcceleratedSurfaceBuffersSwapped, |
240 gfx::PluginWindowHandle /* window */) | 256 gfx::PluginWindowHandle /* window */) |
241 #endif | 257 #endif |
242 | 258 |
243 IPC_END_MESSAGES(GpuCommandBuffer) | 259 IPC_END_MESSAGES(GpuCommandBuffer) |
| 260 |
| 261 //------------------------------------------------------------------------------ |
| 262 |
| 263 // GpuVideoDecoderMsgs : send from renderer process to gpu process. |
| 264 IPC_BEGIN_MESSAGES(GpuVideoDecoder) |
| 265 // Initialize and configure GpuVideoDecoder asynchronously. |
| 266 IPC_MESSAGE_ROUTED1(GpuVideoDecoderMsg_Initialize, |
| 267 GpuVideoDecoderInitParam) |
| 268 |
| 269 // Destroy and release GpuVideoDecoder asynchronously. |
| 270 IPC_MESSAGE_ROUTED0(GpuVideoDecoderMsg_Destroy) |
| 271 |
| 272 // Start decoder flushing operation. |
| 273 IPC_MESSAGE_ROUTED0(GpuVideoDecoderMsg_Flush) |
| 274 |
| 275 // Send input buffer to GpuVideoDecoder. |
| 276 IPC_MESSAGE_ROUTED1(GpuVideoDecoderMsg_EmptyThisBuffer, |
| 277 GpuVideoDecoderInputBufferParam) |
| 278 |
| 279 // Require output buffer from GpuVideoDecoder. |
| 280 IPC_MESSAGE_ROUTED1(GpuVideoDecoderMsg_FillThisBuffer, |
| 281 GpuVideoDecoderOutputBufferParam) |
| 282 |
| 283 // GpuVideoDecoderHost has consumed the output buffer. |
| 284 // NOTE: this may only useful for copy back solution |
| 285 // where output transfer buffer had to be guarded. |
| 286 IPC_MESSAGE_ROUTED0(GpuVideoDecoderMsg_FillThisBufferDoneACK) |
| 287 |
| 288 IPC_END_MESSAGES(GpuVideoDecoder) |
| 289 |
| 290 //------------------------------------------------------------------------------ |
| 291 |
| 292 // GpuVideoDecoderMsgs : send from gpu process to renderer process. |
| 293 IPC_BEGIN_MESSAGES(GpuVideoDecoderHost) |
| 294 // Confirm GpuVideoDecoder had been initialized or failed to initialize. |
| 295 IPC_MESSAGE_ROUTED1(GpuVideoDecoderHostMsg_InitializeACK, |
| 296 GpuVideoDecoderInitDoneParam) |
| 297 |
| 298 // Confrim GpuVideoDecoder had been destroyed properly. |
| 299 IPC_MESSAGE_ROUTED0(GpuVideoDecoderHostMsg_DestroyACK) |
| 300 |
| 301 // Confirm decoder had been flushed. |
| 302 IPC_MESSAGE_ROUTED0(GpuVideoDecoderHostMsg_FlushACK) |
| 303 |
| 304 // GpuVideoDecoder has consumed input buffer from transfer buffer. |
| 305 IPC_MESSAGE_ROUTED0(GpuVideoDecoderHostMsg_EmptyThisBufferACK) |
| 306 |
| 307 // GpuVideoDecoder require new input buffer. |
| 308 IPC_MESSAGE_ROUTED0(GpuVideoDecoderHostMsg_EmptyThisBufferDone) |
| 309 |
| 310 // GpuVideoDecoder report output buffer ready. |
| 311 IPC_MESSAGE_ROUTED1(GpuVideoDecoderHostMsg_FillThisBufferDone, |
| 312 GpuVideoDecoderOutputBufferParam) |
| 313 |
| 314 // GpuVideoDecoder report output format change. |
| 315 IPC_MESSAGE_ROUTED1(GpuVideoDecoderHostMsg_MediaFormatChange, |
| 316 GpuVideoDecoderFormatChangeParam) |
| 317 |
| 318 // GpuVideoDecoder report error. |
| 319 IPC_MESSAGE_ROUTED1(GpuVideoDecoderHostMsg_ErrorNotification, |
| 320 GpuVideoDecoderErrorInfoParam) |
| 321 |
| 322 IPC_END_MESSAGES(GpuVideoDecoderHost) |
| 323 |
OLD | NEW |