OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 module mojo; | |
6 | |
7 import "components/view_manager/public/interfaces/compositor_frame.mojom"; | |
8 | |
9 struct ReturnedResource { | |
10 uint32 id; | |
11 uint32 sync_point; | |
12 int32 count; | |
13 bool lost; | |
14 }; | |
15 | |
16 interface ResourceReturner { | |
17 ReturnResources(array<ReturnedResource> resources); | |
18 }; | |
19 | |
20 interface Surface { | |
21 // Request the id namespace for this connection. Fully qualified surface ids | |
22 // are the combination of the id_namespace for the connection that created the | |
23 // surface and the id_local component allocated by the caller. | |
24 GetIdNamespace() => (uint32 id_namespace); | |
25 | |
26 // Sets a ResourceReturner that will receive unused resources. | |
27 SetResourceReturner(ResourceReturner returner); | |
28 | |
29 // Creates a new surface with the given local identifier. Once a surface is | |
30 // created the caller may submit frames to it or destroy it using the local | |
31 // identifier. The caller can also produce a fully qualified surface id that | |
32 // can be embedded in frames produces by different connections. | |
33 CreateSurface(uint32 id_local); | |
34 | |
35 // After the submitted frame is drawn for the first time, the surface will | |
36 // respond to the SubmitFrame message. Clients should use this acknowledgement | |
37 // to ratelimit frame submissions. | |
38 SubmitFrame(uint32 id_local, CompositorFrame frame) => (); | |
39 DestroySurface(uint32 id_local); | |
40 }; | |
OLD | NEW |