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 mus.mojom; | 5 module mus.mojom; |
6 | 6 |
| 7 import "cc/ipc/returned_resource.mojom"; |
7 import "components/mus/public/interfaces/quads.mojom"; | 8 import "components/mus/public/interfaces/quads.mojom"; |
8 import "ui/gfx/geometry/mojo/geometry.mojom"; | 9 import "ui/gfx/geometry/mojo/geometry.mojom"; |
9 import "gpu/ipc/common/mailbox_holder.mojom"; | 10 import "gpu/ipc/common/mailbox_holder.mojom"; |
10 import "gpu/ipc/common/sync_token.mojom"; | 11 import "gpu/ipc/common/sync_token.mojom"; |
11 | 12 |
12 enum ResourceFormat { | 13 enum ResourceFormat { |
13 RGBA_8888, | 14 RGBA_8888, |
14 RGBA_4444, | 15 RGBA_4444, |
15 BGRA_8888, | 16 BGRA_8888, |
16 ALPHA_8, | 17 ALPHA_8, |
17 LUMINANCE_8, | 18 LUMINANCE_8, |
18 RGB_565, | 19 RGB_565, |
19 ETC1, | 20 ETC1, |
20 }; | 21 }; |
21 | 22 |
22 // See src/cc/resources/returned_resource.h. | |
23 struct ReturnedResource { | |
24 uint32 id; | |
25 gpu.mojom.SyncToken sync_token; | |
26 int32 count; | |
27 bool lost; | |
28 }; | |
29 | |
30 // A TransferableResource is a graphics resource such as a texture or a bitmap | 23 // A TransferableResource is a graphics resource such as a texture or a bitmap |
31 // in shared memory (software mode) that is shared between the window server and | 24 // in shared memory (software mode) that is shared between the window server and |
32 // a client. This data structure is used to manage reuse of | 25 // a client. This data structure is used to manage reuse of |
33 // the memory once it is no longer needed by the window server and GPU service. | 26 // the memory once it is no longer needed by the window server and GPU service. |
34 struct TransferableResource { | 27 struct TransferableResource { |
35 // |id| is an integer that uniquely identifies this resource in the client so | 28 // |id| is an integer that uniquely identifies this resource in the client so |
36 // that the window server can return this resource back to the client. | 29 // that the window server can return this resource back to the client. |
37 uint32 id; | 30 uint32 id; |
38 ResourceFormat format; | 31 ResourceFormat format; |
39 uint32 filter; | 32 uint32 filter; |
(...skipping 20 matching lines...) Expand all Loading... |
60 // separate interface to allow CompositorFrames to be delivered from | 53 // separate interface to allow CompositorFrames to be delivered from |
61 // supplementary (not main) threads of a mojo app. | 54 // supplementary (not main) threads of a mojo app. |
62 interface Surface { | 55 interface Surface { |
63 // After the submitted frame is drawn for the first time, the receiver will | 56 // After the submitted frame is drawn for the first time, the receiver will |
64 // respond to the SubmitFrame message. Clients should use this acknowledgement | 57 // respond to the SubmitFrame message. Clients should use this acknowledgement |
65 // to ratelimit frame submissions. | 58 // to ratelimit frame submissions. |
66 SubmitCompositorFrame(CompositorFrame frame) => (); | 59 SubmitCompositorFrame(CompositorFrame frame) => (); |
67 }; | 60 }; |
68 | 61 |
69 interface SurfaceClient { | 62 interface SurfaceClient { |
70 ReturnResources(array<ReturnedResource> resources); | 63 ReturnResources(array<cc.mojom.ReturnedResource> resources); |
71 }; | 64 }; |
OLD | NEW |