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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 | 304 |
305 // Create a surface for offscreen rendering. | 305 // Create a surface for offscreen rendering. |
306 IPC_SYNC_MESSAGE_CONTROL1_1(GpuChannelMsg_CreateOffscreenSurface, | 306 IPC_SYNC_MESSAGE_CONTROL1_1(GpuChannelMsg_CreateOffscreenSurface, |
307 gfx::Size, /* size */ | 307 gfx::Size, /* size */ |
308 int /* route_id */) | 308 int /* route_id */) |
309 | 309 |
310 // Destroy a surface by routing id. | 310 // Destroy a surface by routing id. |
311 IPC_MESSAGE_CONTROL1(GpuChannelMsg_DestroySurface, | 311 IPC_MESSAGE_CONTROL1(GpuChannelMsg_DestroySurface, |
312 int /* route_id */) | 312 int /* route_id */) |
313 | 313 |
314 // Create a hardware video decoder; the new route ID is returned through | |
315 // AcceleratedVideoDecoderHostMsg_CreateDone. | |
316 // We need this to be control message because we had to map the GpuChannel and | |
317 // |decoder_id|. | |
318 IPC_MESSAGE_CONTROL3(GpuChannelMsg_CreateVideoDecoder, | |
319 int32, /* decoder_host_id */ | |
320 uint32, /* command buffer route id*/ | |
321 std::vector<uint32>) /* configs */ | |
322 | |
323 // Release all resource of the hardware video decoder which was assocaited | |
324 // with the input |decoder_id|. | |
325 // TODO(hclam): This message needs to be asynchronous. | |
326 IPC_SYNC_MESSAGE_CONTROL1_0(GpuChannelMsg_DestroyVideoDecoder, | |
327 int32 /* decoder_id */) | |
328 | |
329 // Create a TransportTexture corresponding to |host_id|. | 314 // Create a TransportTexture corresponding to |host_id|. |
330 IPC_MESSAGE_CONTROL2(GpuChannelMsg_CreateTransportTexture, | 315 IPC_MESSAGE_CONTROL2(GpuChannelMsg_CreateTransportTexture, |
331 int32, /* context_route_id */ | 316 int32, /* context_route_id */ |
332 int32 /* host_id */) | 317 int32 /* host_id */) |
333 | 318 |
334 //------------------------------------------------------------------------------ | 319 //------------------------------------------------------------------------------ |
335 // GPU Command Buffer Messages | 320 // GPU Command Buffer Messages |
336 // These are messages between a renderer process to the GPU process relating to | 321 // These are messages between a renderer process to the GPU process relating to |
337 // a single OpenGL context. | 322 // a single OpenGL context. |
338 // Initialize a command buffer with the given number of command entries. | 323 // Initialize a command buffer with the given number of command entries. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 IPC_SYNC_MESSAGE_ROUTED1_0(GpuCommandBufferMsg_DestroyTransferBuffer, | 382 IPC_SYNC_MESSAGE_ROUTED1_0(GpuCommandBufferMsg_DestroyTransferBuffer, |
398 int32 /* id */) | 383 int32 /* id */) |
399 | 384 |
400 // Get the shared memory handle for a transfer buffer mapped to the callers | 385 // Get the shared memory handle for a transfer buffer mapped to the callers |
401 // process. | 386 // process. |
402 IPC_SYNC_MESSAGE_ROUTED1_2(GpuCommandBufferMsg_GetTransferBuffer, | 387 IPC_SYNC_MESSAGE_ROUTED1_2(GpuCommandBufferMsg_GetTransferBuffer, |
403 int32 /* id */, | 388 int32 /* id */, |
404 base::SharedMemoryHandle /* transfer_buffer */, | 389 base::SharedMemoryHandle /* transfer_buffer */, |
405 uint32 /* size */) | 390 uint32 /* size */) |
406 | 391 |
| 392 // Create and initialize a hardware video decoder. |
| 393 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_CreateVideoDecoder, |
| 394 int32, /* decoder_host_id */ |
| 395 std::vector<uint32>) /* configs */ |
| 396 |
| 397 // Release all resources held by the hardware video decoder associated with this |
| 398 // stub. |
| 399 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_DestroyVideoDecoder); |
| 400 |
407 // Send from command buffer stub to proxy when window is invalid and must be | 401 // Send from command buffer stub to proxy when window is invalid and must be |
408 // repainted. | 402 // repainted. |
409 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_NotifyRepaint) | 403 IPC_MESSAGE_ROUTED0(GpuCommandBufferMsg_NotifyRepaint) |
410 | 404 |
411 // Tells the GPU process to resize an offscreen frame buffer. | 405 // Tells the GPU process to resize an offscreen frame buffer. |
412 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_ResizeOffscreenFrameBuffer, | 406 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_ResizeOffscreenFrameBuffer, |
413 gfx::Size /* size */) | 407 gfx::Size /* size */) |
414 | 408 |
415 #if defined(OS_MACOSX) | 409 #if defined(OS_MACOSX) |
416 // On Mac OS X the GPU plugin must be offscreen, because there is no | 410 // On Mac OS X the GPU plugin must be offscreen, because there is no |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 // seen (using |tokens.last_token_read| as a wrap-around indicator). The | 462 // seen (using |tokens.last_token_read| as a wrap-around indicator). The |
469 // implementation REQUIRES that |tokens| be the first parameter of these | 463 // implementation REQUIRES that |tokens| be the first parameter of these |
470 // messages. | 464 // messages. |
471 | 465 |
472 // Message to query configuration information from the GPU process. | 466 // Message to query configuration information from the GPU process. |
473 IPC_SYNC_MESSAGE_CONTROL2_1(AcceleratedVideoDecoderMsg_GetConfigs, | 467 IPC_SYNC_MESSAGE_CONTROL2_1(AcceleratedVideoDecoderMsg_GetConfigs, |
474 gpu::ReadWriteTokens, /* tokens */ | 468 gpu::ReadWriteTokens, /* tokens */ |
475 std::vector<uint32>, /* Proto config */ | 469 std::vector<uint32>, /* Proto config */ |
476 std::vector<uint32>) /* Matching configs */ | 470 std::vector<uint32>) /* Matching configs */ |
477 | 471 |
478 // Message to initialize the accelerated video decoder. | |
479 IPC_MESSAGE_ROUTED2(AcceleratedVideoDecoderMsg_Initialize, | |
480 gpu::ReadWriteTokens, /* tokens */ | |
481 std::vector<uint32>) /* Config */ | |
482 | |
483 // Send input buffer for decoding. | 472 // Send input buffer for decoding. |
484 IPC_MESSAGE_ROUTED4(AcceleratedVideoDecoderMsg_Decode, | 473 IPC_MESSAGE_ROUTED4(AcceleratedVideoDecoderMsg_Decode, |
485 gpu::ReadWriteTokens, /* tokens */ | 474 gpu::ReadWriteTokens, /* tokens */ |
486 base::SharedMemoryHandle, /* input_buffer_handle */ | 475 base::SharedMemoryHandle, /* input_buffer_handle */ |
487 int32, /* bitstream_buffer_id */ | 476 int32, /* bitstream_buffer_id */ |
488 int32) /* size */ | 477 int32) /* size */ |
489 | 478 |
490 // Sent from Renderer process to the GPU process to give the texture IDs for | 479 // Sent from Renderer process to the GPU process to give the texture IDs for |
491 // the textures the decoder will use for output. Delays evaluation until | 480 // the textures the decoder will use for output. Delays evaluation until |
492 // |token.second| is seen. | 481 // |token.second| is seen. |
493 IPC_MESSAGE_ROUTED4(AcceleratedVideoDecoderMsg_AssignTextures, | 482 IPC_MESSAGE_ROUTED4(AcceleratedVideoDecoderMsg_AssignGLESBuffers, |
494 gpu::ReadWriteTokens, /* tokens */ | 483 gpu::ReadWriteTokens, /* tokens */ |
495 std::vector<int32>, /* Picture buffer ID */ | 484 std::vector<int32>, /* Picture buffer ID */ |
496 std::vector<uint32>, /* Texture ID */ | 485 std::vector<uint32>, /* Texture ID */ |
497 std::vector<gfx::Size>) /* Size */ | 486 std::vector<gfx::Size>) /* Size */ |
498 | 487 |
499 // Sent from Renderer process to the GPU process to give the system memory | 488 // Sent from Renderer process to the GPU process to give the system memory |
500 // buffers that the decoder will use for output. | 489 // buffers that the decoder will use for output. |
501 // | 490 // |
502 // The length of the list of SharedMemoryHandles cannot exceed | 491 // The length of the list of SharedMemoryHandles cannot exceed |
503 // FileDescriptorSet::MAX_DESCRIPTORS_PER_MESSAGE; see | 492 // FileDescriptorSet::MAX_DESCRIPTORS_PER_MESSAGE; see |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 // Accelerated video decoder has consumed input buffer from transfer buffer. | 524 // Accelerated video decoder has consumed input buffer from transfer buffer. |
536 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed, | 525 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed, |
537 int32) /* Processed buffer ID */ | 526 int32) /* Processed buffer ID */ |
538 | 527 |
539 // Allocate video frames for output of the hardware video decoder. | 528 // Allocate video frames for output of the hardware video decoder. |
540 IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers, | 529 IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers, |
541 int32, /* Number of video frames to generate */ | 530 int32, /* Number of video frames to generate */ |
542 gfx::Size, /* Requested size of buffer */ | 531 gfx::Size, /* Requested size of buffer */ |
543 int32) /* Type of buffer */ | 532 int32) /* Type of buffer */ |
544 | 533 |
545 // Decoder has been created and is ready for initialization. | |
546 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_CreateDone, | |
547 int32) /* Decoder ID */ | |
548 | |
549 // Notify client that decoder has been initialized. | 534 // Notify client that decoder has been initialized. |
550 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_InitializeDone) | 535 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_InitializeDone) |
551 | 536 |
552 // Decoder reports that a picture is ready and buffer does not need to be passed | 537 // Decoder reports that a picture is ready and buffer does not need to be passed |
553 // back to the decoder. | 538 // back to the decoder. |
554 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_DismissPictureBuffer, | 539 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_DismissPictureBuffer, |
555 int32) /* Picture buffer ID */ | 540 int32) /* Picture buffer ID */ |
556 | 541 |
557 // Decoder reports that a picture is ready. | 542 // Decoder reports that a picture is ready. |
558 IPC_MESSAGE_ROUTED4(AcceleratedVideoDecoderHostMsg_PictureReady, | 543 IPC_MESSAGE_ROUTED4(AcceleratedVideoDecoderHostMsg_PictureReady, |
559 int32, /* Picture buffer ID */ | 544 int32, /* Picture buffer ID */ |
560 int32, /* Bitstream buffer ID */ | 545 int32, /* Bitstream buffer ID */ |
561 gfx::Size, /* Visible size */ | 546 gfx::Size, /* Visible size */ |
562 gfx::Size) /* Decoded size */ | 547 gfx::Size) /* Decoded size */ |
563 | 548 |
564 // Confirm decoder has been flushed. | 549 // Confirm decoder has been flushed. |
565 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) | 550 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) |
566 | 551 |
567 // Confirm decoder has been aborted. | 552 // Confirm decoder has been aborted. |
568 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_AbortDone) | 553 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_AbortDone) |
569 | 554 |
570 // Decoder has faced end of stream marker in the stream. | 555 // Decoder has faced end of stream marker in the stream. |
571 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream) | 556 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream) |
572 | 557 |
573 // Video decoder has encountered an error. | 558 // Video decoder has encountered an error. |
574 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 559 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
575 uint32) /* Error ID */ | 560 uint32) /* Error ID */ |
OLD | NEW |