OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 module mojo; |
| 6 |
| 7 import "ui/mojo/geometry/geometry.mojom"; |
| 8 import "components/view_manager/public/interfaces/quads.mojom"; |
| 9 |
| 10 enum ResourceFormat { |
| 11 RGBA_8888, |
| 12 RGBA_4444, |
| 13 BGRA_8888, |
| 14 ALPHA_8, |
| 15 LUMINANCE_8, |
| 16 RGB_565, |
| 17 ETC1, |
| 18 }; |
| 19 |
| 20 struct Mailbox { |
| 21 array<int8, 64> name; |
| 22 }; |
| 23 |
| 24 struct MailboxHolder { |
| 25 Mailbox mailbox; |
| 26 uint32 texture_target; |
| 27 uint32 sync_point; |
| 28 }; |
| 29 |
| 30 struct TransferableResource { |
| 31 uint32 id; |
| 32 ResourceFormat format; |
| 33 uint32 filter; |
| 34 Size size; |
| 35 MailboxHolder mailbox_holder; |
| 36 bool is_repeated; |
| 37 bool is_software; |
| 38 }; |
| 39 |
| 40 struct CompositorFrame { |
| 41 array<TransferableResource> resources; |
| 42 array<Pass> passes; |
| 43 }; |
| 44 |
| 45 // CompositorFrameReceiver is an interface for receiving CompositorFrame |
| 46 // structs. This is a separate interface to allow CompositorFrames to be |
| 47 // delivered from supplementary (not main) threads of a mojo app. |
| 48 interface CompositorFrameReceiver { |
| 49 // After the submitted frame is drawn for the first time, the receiver will |
| 50 // respond to the SubmitFrame message. Clients should use this acknowledgement |
| 51 // to ratelimit frame submissions. |
| 52 SubmitCompositorFrame(CompositorFrame frame) => (); |
| 53 }; |
OLD | NEW |