| 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 // See src/cc/resources/returned_resource.h. | 20 // See src/cc/resources/returned_resource.h. |
| 21 struct ReturnedResource { | 21 struct ReturnedResource { |
| 22 uint32 id; | 22 uint32 id; |
| 23 uint32 sync_point; | 23 uint32 sync_point; |
| 24 int32 count; | 24 int32 count; |
| 25 bool lost; | 25 bool lost; |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 interface ResourceReturner { | |
| 29 ReturnResources(array<ReturnedResource> resources); | |
| 30 }; | |
| 31 | |
| 32 // See src/gpu/command_buffer/common/mailbox.h. | 28 // See src/gpu/command_buffer/common/mailbox.h. |
| 33 struct Mailbox { | 29 struct Mailbox { |
| 34 array<int8, 64> name; | 30 array<int8, 64> name; |
| 35 }; | 31 }; |
| 36 | 32 |
| 37 // See src/gpu/command_buffer/common/mailbox_holder.h. | 33 // See src/gpu/command_buffer/common/mailbox_holder.h. |
| 38 struct MailboxHolder { | 34 struct MailboxHolder { |
| 39 Mailbox mailbox; | 35 Mailbox mailbox; |
| 40 uint32 texture_target; | 36 uint32 texture_target; |
| 41 uint32 sync_point; | 37 uint32 sync_point; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 55 MailboxHolder mailbox_holder; | 51 MailboxHolder mailbox_holder; |
| 56 bool is_repeated; | 52 bool is_repeated; |
| 57 bool is_software; | 53 bool is_software; |
| 58 }; | 54 }; |
| 59 | 55 |
| 60 // See src/cc/output/compositor_frame.h. | 56 // See src/cc/output/compositor_frame.h. |
| 61 struct CompositorFrame { | 57 struct CompositorFrame { |
| 62 array<TransferableResource> resources; | 58 array<TransferableResource> resources; |
| 63 array<Pass> passes; | 59 array<Pass> passes; |
| 64 }; | 60 }; |
| 61 |
| 62 // A Surface is an interface for receiving CompositorFrame structs. This is a |
| 63 // separate interface to allow CompositorFrames to be delivered from |
| 64 // supplementary (not main) threads of a mojo app. |
| 65 interface Surface { |
| 66 // After the submitted frame is drawn for the first time, the receiver will |
| 67 // respond to the SubmitFrame message. Clients should use this acknowledgement |
| 68 // to ratelimit frame submissions. |
| 69 SubmitCompositorFrame(CompositorFrame frame) => (); |
| 70 }; |
| 71 |
| 72 interface SurfaceClient { |
| 73 ReturnResources(array<ReturnedResource> resources); |
| 74 }; |
| OLD | NEW |