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
3 // found in the LICENSE file.
7 struct CommandBufferState {
12 int32 error; // TODO(piman): enum
13 int32 context_lost_reason; // TODO(piman): enum
17 // TODO(piman): we need to support proper SHM handles, or refactor command
18 // buffers to sit on top of mojo primitives (e.g. DataPipe, etc.).
23 interface CommandBufferSyncClient {
24 void DidInitialize(bool success);
25 void DidMakeProgress(CommandBufferState state);
28 [Peer=CommandBufferClient]
29 interface CommandBuffer {
30 void Initialize(CommandBufferSyncClient sync_client,
31 ShmHandle shared_state);
32 void SetGetBuffer(int32 buffer);
33 void Flush(int32 put_offset);
34 void MakeProgress(int32 last_get_offset);
35 void RegisterTransferBuffer(int32 id, ShmHandle transfer_buffer, uint32 size);
36 void DestroyTransferBuffer(int32 id);
39 // TODO(piman): move to somewhere else (native_viewport?).
40 void RequestAnimationFrames();
41 void CancelAnimationFrames();
43 // TODO(piman): sync points
47 interface CommandBufferClient {
50 void LostContext(int32 lost_reason); // TODO(piman): enum
52 // TODO(piman): move to somewhere else (native_viewport?).
53 void DrawAnimationFrame();