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 mus.mojom; | 5 module mus.mojom; |
6 | 6 |
7 import "gpu/command_buffer/common/capabilities.mojom"; | 7 import "gpu/command_buffer/common/capabilities.mojom"; |
8 import "gpu/command_buffer/common/command_buffer.mojom"; | 8 import "gpu/command_buffer/common/command_buffer.mojom"; |
9 import "gpu/command_buffer/common/mailbox.mojom"; | |
10 import "gpu/command_buffer/common/sync_token.mojom"; | |
9 import "ui/mojo/geometry/geometry.mojom"; | 11 import "ui/mojo/geometry/geometry.mojom"; |
10 | 12 |
11 struct CommandBufferInitializeResult { | 13 struct CommandBufferInitializeResult { |
12 int32 command_buffer_namespace; | 14 int32 command_buffer_namespace; |
13 uint64 command_buffer_id; | 15 uint64 command_buffer_id; |
14 gpu.mojom.Capabilities capabilities; | 16 gpu.mojom.Capabilities capabilities; |
15 }; | 17 }; |
16 | 18 |
17 interface CommandBufferLostContextObserver { | 19 interface CommandBufferObserver { |
Fady Samuel
2016/02/09 22:53:39
Could we call this CommandBufferClient instead?
Peng
2016/02/10 18:56:55
Done.
| |
18 DidLoseContext(int32 context_lost_reason); | 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); | |
19 }; | 29 }; |
20 | 30 |
21 interface CommandBuffer { | 31 interface CommandBuffer { |
22 // Initialize attempts to initialize the command buffer. | 32 // Initialize attempts to initialize the command buffer. |
23 // If the context is lost after creation the LostContext method on the | 33 // If the context is lost after creation the LostContext method on the |
24 // CommandBufferLostContextObserver's will be called then this pipe will be | 34 // CommandBufferLostContextObserver's will be called then this pipe will be |
25 // closed. | 35 // closed. |
26 Initialize(CommandBufferLostContextObserver lost_observer, | 36 Initialize(CommandBufferObserver observer, |
27 handle<shared_buffer> shared_state, | 37 handle<shared_buffer> shared_state, |
28 array<int32> attribs) => (CommandBufferInitializeResult? result); | 38 array<int32> attribs) => (CommandBufferInitializeResult? result); |
29 SetGetBuffer(int32 buffer); | 39 SetGetBuffer(int32 buffer); |
30 Flush(int32 put_offset); | 40 Flush(int32 put_offset); |
31 MakeProgress(int32 last_get_offset) => (gpu.mojom.CommandBufferState state); | 41 MakeProgress(int32 last_get_offset) => (gpu.mojom.CommandBufferState state); |
32 RegisterTransferBuffer( | 42 RegisterTransferBuffer( |
33 int32 id, handle<shared_buffer> transfer_buffer, uint32 size); | 43 int32 id, handle<shared_buffer> transfer_buffer, uint32 size); |
34 DestroyTransferBuffer(int32 id); | 44 DestroyTransferBuffer(int32 id); |
35 | |
36 CreateImage(int32 id, | 45 CreateImage(int32 id, |
37 handle memory_handle, | 46 handle memory_handle, |
38 int32 type, | 47 int32 type, |
39 mojo.Size size, | 48 mojo.Size size, |
40 int32 format, | 49 int32 format, |
41 int32 internal_format); | 50 int32 internal_format); |
42 DestroyImage(int32 id); | 51 DestroyImage(int32 id); |
52 CreateStreamTexture(uint32 client_texture_id) | |
Fady Samuel
2016/02/09 22:45:16
Yuzhu: These IPCs with callbacks need to be sync I
yzshen1
2016/02/09 22:51:11
I don't think I understand this part well enough t
Fady Samuel
2016/02/09 22:55:59
Actually, not lgtm Chatting with Yuzhu offline, we
| |
53 => (int32 stream_id, bool succeeded); | |
54 ProduceFrontBuffer(gpu.mojom.Mailbox mailbox); | |
55 SignalQuery(uint32 query, uint32 signal_id); | |
56 SignalSyncToken(gpu.mojom.SyncToken sync_token, uint32 signal_id); | |
57 WaitForGetOffsetInRange(int32 start, int32 end) | |
58 => (gpu.mojom.CommandBufferState state); | |
59 WaitForTokenInRange(int32 start, int32 end) | |
60 => (gpu.mojom.CommandBufferState state); | |
43 }; | 61 }; |
OLD | NEW |