| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 [DartPackage="mojo_services"] | 5 [DartPackage="mojo_services"] |
| 6 module mojo; | 6 module mojo; |
| 7 | 7 |
| 8 import "geometry/interfaces/geometry.mojom"; | 8 import "geometry/interfaces/geometry.mojom"; |
| 9 import "surfaces/interfaces/quads.mojom"; | 9 import "surfaces/interfaces/quads.mojom"; |
| 10 import "surfaces/interfaces/surface_id.mojom"; | 10 import "surfaces/interfaces/surface_id.mojom"; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 struct Frame { | 49 struct Frame { |
| 50 array<TransferableResource> resources; | 50 array<TransferableResource> resources; |
| 51 array<Pass> passes; | 51 array<Pass> passes; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 interface ResourceReturner { | 54 interface ResourceReturner { |
| 55 ReturnResources(array<ReturnedResource> resources); | 55 ReturnResources(array<ReturnedResource> resources); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 [ServiceName="mojo::Surface"] |
| 58 interface Surface { | 59 interface Surface { |
| 59 // Request the id namespace for this connection. Fully qualified surface ids | 60 // Request the id namespace for this connection. Fully qualified surface ids |
| 60 // are the combination of the id_namespace for the connection that created the | 61 // are the combination of the id_namespace for the connection that created the |
| 61 // surface and the id_local component allocated by the caller. | 62 // surface and the id_local component allocated by the caller. |
| 62 GetIdNamespace() => (uint32 id_namespace); | 63 GetIdNamespace() => (uint32 id_namespace); |
| 63 | 64 |
| 64 // Sets a ResourceReturner that will receive unused resources. | 65 // Sets a ResourceReturner that will receive unused resources. |
| 65 SetResourceReturner(ResourceReturner returner); | 66 SetResourceReturner(ResourceReturner returner); |
| 66 | 67 |
| 67 // Creates a new surface with the given local identifier. Once a surface is | 68 // Creates a new surface with the given local identifier. Once a surface is |
| 68 // created the caller may submit frames to it or destroy it using the local | 69 // created the caller may submit frames to it or destroy it using the local |
| 69 // identifier. The caller can also produce a fully qualified surface id that | 70 // identifier. The caller can also produce a fully qualified surface id that |
| 70 // can be embedded in frames produces by different connections. | 71 // can be embedded in frames produces by different connections. |
| 71 CreateSurface(uint32 id_local); | 72 CreateSurface(uint32 id_local); |
| 72 | 73 |
| 73 // After the submitted frame is drawn for the first time, the surface will | 74 // After the submitted frame is drawn for the first time, the surface will |
| 74 // respond to the SubmitFrame message. Clients should use this acknowledgement | 75 // respond to the SubmitFrame message. Clients should use this acknowledgement |
| 75 // to ratelimit frame submissions. | 76 // to ratelimit frame submissions. |
| 76 SubmitFrame(uint32 id_local, Frame frame) => (); | 77 SubmitFrame(uint32 id_local, Frame frame) => (); |
| 77 DestroySurface(uint32 id_local); | 78 DestroySurface(uint32 id_local); |
| 78 }; | 79 }; |
| OLD | NEW |