OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 import "ui/mojo/geometry/geometry.mojom"; | 7 import "ui/mojo/geometry/geometry.mojom"; |
8 import "components/view_manager/public/interfaces/quads.mojom"; | 8 import "components/view_manager/public/interfaces/quads.mojom"; |
9 | 9 |
10 enum ResourceFormat { | 10 enum ResourceFormat { |
11 RGBA_8888, | 11 RGBA_8888, |
12 RGBA_4444, | 12 RGBA_4444, |
13 BGRA_8888, | 13 BGRA_8888, |
14 ALPHA_8, | 14 ALPHA_8, |
15 LUMINANCE_8, | 15 LUMINANCE_8, |
16 RGB_565, | 16 RGB_565, |
17 ETC1, | 17 ETC1, |
18 }; | 18 }; |
19 | 19 |
20 struct ReturnedResource { | |
21 uint32 id; | |
sky
2015/08/25 17:11:12
Document all these fields. For example, what does
Fady Samuel
2015/08/25 23:39:30
Done in a separate patch which you reviewed.
| |
22 uint32 sync_point; | |
23 int32 count; | |
24 bool lost; | |
25 }; | |
26 | |
27 interface ResourceReturner { | |
28 ReturnResources(array<ReturnedResource> resources); | |
29 }; | |
30 | |
20 // See src/gpu/command_buffer/common/mailbox.h. | 31 // See src/gpu/command_buffer/common/mailbox.h. |
21 struct Mailbox { | 32 struct Mailbox { |
22 array<int8, 64> name; | 33 array<int8, 64> name; |
23 }; | 34 }; |
24 | 35 |
25 // See src/gpu/command_buffer/common/mailbox_holder.h. | 36 // See src/gpu/command_buffer/common/mailbox_holder.h. |
26 struct MailboxHolder { | 37 struct MailboxHolder { |
27 Mailbox mailbox; | 38 Mailbox mailbox; |
28 uint32 texture_target; | 39 uint32 texture_target; |
29 uint32 sync_point; | 40 uint32 sync_point; |
(...skipping 13 matching lines...) Expand all Loading... | |
43 MailboxHolder mailbox_holder; | 54 MailboxHolder mailbox_holder; |
44 bool is_repeated; | 55 bool is_repeated; |
45 bool is_software; | 56 bool is_software; |
46 }; | 57 }; |
47 | 58 |
48 // See src/cc/output/compositor_frame.h. | 59 // See src/cc/output/compositor_frame.h. |
49 struct CompositorFrame { | 60 struct CompositorFrame { |
50 array<TransferableResource> resources; | 61 array<TransferableResource> resources; |
51 array<Pass> passes; | 62 array<Pass> passes; |
52 }; | 63 }; |
64 | |
65 // CompositorFrameReceiver is an interface for receiving CompositorFrame | |
66 // structs. This is a separate interface to allow CompositorFrames to be | |
67 // delivered from supplementary (not main) threads of a mojo app. | |
68 interface CompositorFrameReceiver { | |
69 // After the submitted frame is drawn for the first time, the receiver will | |
70 // respond to the SubmitFrame message. Clients should use this acknowledgement | |
71 // to ratelimit frame submissions. | |
72 SubmitCompositorFrame(CompositorFrame frame) => (); | |
73 }; | |
OLD | NEW |