OLD | NEW |
| (Empty) |
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. | |
4 | |
5 module mus.mojom; | |
6 | |
7 import "gpu/ipc/common/capabilities.mojom"; | |
8 import "gpu/ipc/common/command_buffer.mojom"; | |
9 import "gpu/ipc/common/mailbox.mojom"; | |
10 import "gpu/ipc/common/sync_token.mojom"; | |
11 import "ui/gfx/geometry/mojo/geometry.mojom"; | |
12 | |
13 struct CommandBufferInitializeResult { | |
14 int32 command_buffer_namespace; | |
15 uint64 command_buffer_id; | |
16 gpu.mojom.Capabilities capabilities; | |
17 }; | |
18 | |
19 interface CommandBufferClient { | |
20 Destroyed(int32 context_lost_reason, | |
21 int32 error); | |
22 SignalAck(uint32 id); | |
23 // TODO(penghuang): support latency_info and use gfx::SwapResult for result. | |
24 SwapBuffersCompleted(/* array<ui.mojom.LatencyInfo> latency_info, */ | |
25 int32 result); | |
26 UpdateState(gpu.mojom.CommandBufferState state); | |
27 // TODO(penghuang): use base::TimeTicks & base::TimeDelta. | |
28 UpdateVSyncParameters(int64 timebase, int64 interval); | |
29 }; | |
30 | |
31 interface CommandBuffer { | |
32 // Initialize attempts to initialize the command buffer. | |
33 // If the context is lost after creation the LostContext method on the | |
34 // CommandBufferClient's will be called then this pipe will be | |
35 // closed. | |
36 Initialize(CommandBufferClient client, | |
37 handle<shared_buffer> shared_state, | |
38 array<int32> attribs) => (CommandBufferInitializeResult? result); | |
39 SetGetBuffer(int32 buffer); | |
40 Flush(int32 put_offset); | |
41 MakeProgress(int32 last_get_offset) => (gpu.mojom.CommandBufferState state); | |
42 RegisterTransferBuffer( | |
43 int32 id, handle<shared_buffer> transfer_buffer, uint32 size); | |
44 DestroyTransferBuffer(int32 id); | |
45 CreateImage(int32 id, | |
46 handle memory_handle, | |
47 int32 type, | |
48 gfx.mojom.Size size, | |
49 int32 format, | |
50 int32 internal_format); | |
51 DestroyImage(int32 id); | |
52 CreateStreamTexture(uint32 client_texture_id) | |
53 => (int32 stream_id, bool succeeded); | |
54 TakeFrontBuffer(gpu.mojom.Mailbox mailbox); | |
55 ReturnFrontBuffer(gpu.mojom.Mailbox mailbox, bool is_lost); | |
56 SignalQuery(uint32 query, uint32 signal_id); | |
57 SignalSyncToken(gpu.mojom.SyncToken sync_token, uint32 signal_id); | |
58 WaitForGetOffsetInRange(int32 start, int32 end) | |
59 => (gpu.mojom.CommandBufferState state); | |
60 WaitForTokenInRange(int32 start, int32 end) | |
61 => (gpu.mojom.CommandBufferState state); | |
62 }; | |
OLD | NEW |