OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/shared_memory.h" |
| 6 #include "ipc/ipc_message_macros.h" |
| 7 |
| 8 IPC_BEGIN_MESSAGES(CommandBuffer) |
| 9 // Initialize a command buffer with the given number of command entries. |
| 10 // Returns the shared memory handle for the command buffer mapped to the |
| 11 // calling process. |
| 12 IPC_SYNC_MESSAGE_ROUTED1_1(CommandBufferMsg_Initialize, |
| 13 int32 /* size */, |
| 14 base::SharedMemoryHandle /* ring_buffer */) |
| 15 |
| 16 // Get the number of command entries in the command buffer. |
| 17 IPC_SYNC_MESSAGE_ROUTED0_1(CommandBufferMsg_GetSize, |
| 18 int32 /* size */) |
| 19 |
| 20 // Synchronize the put and get offsets of both processes. Caller passes its |
| 21 // current put offset. Current get offset is returned. |
| 22 IPC_SYNC_MESSAGE_ROUTED1_1(CommandBufferMsg_SyncOffsets, |
| 23 int32 /* put_offset */, |
| 24 int32 /* get_offset */) |
| 25 |
| 26 // Get the current get offset. |
| 27 IPC_SYNC_MESSAGE_ROUTED0_1(CommandBufferMsg_GetGetOffset, |
| 28 int32 /* get_offset */) |
| 29 |
| 30 // Get the current put offset. |
| 31 IPC_SYNC_MESSAGE_ROUTED0_1(CommandBufferMsg_GetPutOffset, |
| 32 int32 /* put_offset */) |
| 33 |
| 34 // Create a shared memory transfer buffer. Returns an id that can be used to |
| 35 // identify the transfer buffer from a comment. |
| 36 IPC_SYNC_MESSAGE_ROUTED1_1(CommandBufferMsg_CreateTransferBuffer, |
| 37 int32 /* size */, |
| 38 int32 /* id */) |
| 39 |
| 40 // Destroy a previously created transfer buffer. |
| 41 IPC_SYNC_MESSAGE_ROUTED1_0(CommandBufferMsg_DestroyTransferBuffer, |
| 42 int32 /* id */) |
| 43 |
| 44 // Get the shared memory handle for a transfer buffer mapped to the callers |
| 45 // process. |
| 46 IPC_SYNC_MESSAGE_ROUTED1_1(CommandBufferMsg_GetTransferBuffer, |
| 47 int32 /* id */, |
| 48 base::SharedMemoryHandle /* transfer_buffer */) |
| 49 |
| 50 // Get the most recently processed token. Used for implementing fences. |
| 51 IPC_SYNC_MESSAGE_ROUTED0_1(CommandBufferMsg_GetToken, |
| 52 int32 /* token */) |
| 53 |
| 54 // Get the current parse error. Calling this resets the parse error if it is |
| 55 // recoverable. |
| 56 // TODO(apatrick): Switch to the parse_error::ParseError enum now that NPAPI |
| 57 // no longer limits to restricted set of datatypes. |
| 58 IPC_SYNC_MESSAGE_ROUTED0_1(CommandBufferMsg_ResetParseError, |
| 59 int32 /* parse_error */) |
| 60 |
| 61 // Get the current error status. |
| 62 IPC_SYNC_MESSAGE_ROUTED0_1(CommandBufferMsg_GetErrorStatus, |
| 63 bool /* status */) |
| 64 |
| 65 IPC_END_MESSAGES(CommandBuffer) |
OLD | NEW |