| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 module mojo { | 5 module mojo { |
| 6 | 6 |
| 7 struct CommandBufferState { | 7 struct CommandBufferState { |
| 8 int32 num_entries; | 8 int32 num_entries; |
| 9 int32 get_offset; | 9 int32 get_offset; |
| 10 int32 put_offset; | 10 int32 put_offset; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 [Peer=CommandBufferClient] | 28 [Peer=CommandBufferClient] |
| 29 interface CommandBuffer { | 29 interface CommandBuffer { |
| 30 Initialize(CommandBufferSyncClient sync_client, | 30 Initialize(CommandBufferSyncClient sync_client, |
| 31 ShmHandle shared_state); | 31 ShmHandle shared_state); |
| 32 SetGetBuffer(int32 buffer); | 32 SetGetBuffer(int32 buffer); |
| 33 Flush(int32 put_offset); | 33 Flush(int32 put_offset); |
| 34 MakeProgress(int32 last_get_offset); | 34 MakeProgress(int32 last_get_offset); |
| 35 RegisterTransferBuffer(int32 id, ShmHandle transfer_buffer, uint32 size); | 35 RegisterTransferBuffer(int32 id, ShmHandle transfer_buffer, uint32 size); |
| 36 DestroyTransferBuffer(int32 id); | 36 DestroyTransferBuffer(int32 id); |
| 37 Echo(); | 37 Echo() => (); |
| 38 | 38 |
| 39 // TODO(piman): move to somewhere else (native_viewport?). | 39 // TODO(piman): move to somewhere else (native_viewport?). |
| 40 RequestAnimationFrames(); | 40 RequestAnimationFrames(); |
| 41 CancelAnimationFrames(); | 41 CancelAnimationFrames(); |
| 42 | 42 |
| 43 // TODO(piman): sync points | 43 // TODO(piman): sync points |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 [Peer=CommandBuffer] | 46 [Peer=CommandBuffer] |
| 47 interface CommandBufferClient { | 47 interface CommandBufferClient { |
| 48 DidDestroy(); | 48 DidDestroy(); |
| 49 EchoAck(); | |
| 50 LostContext(int32 lost_reason); // TODO(piman): enum | 49 LostContext(int32 lost_reason); // TODO(piman): enum |
| 51 | 50 |
| 52 // TODO(piman): move to somewhere else (native_viewport?). | 51 // TODO(piman): move to somewhere else (native_viewport?). |
| 53 DrawAnimationFrame(); | 52 DrawAnimationFrame(); |
| 54 }; | 53 }; |
| 55 | 54 |
| 56 } | 55 } |
| 57 | 56 |
| OLD | NEW |