Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: mojo/services/surfaces/interfaces/surfaces.mojom

Issue 1454113003: Require an explicit ServiceName annotation for interfaces in C++. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 };
OLDNEW
« no previous file with comments | « mojo/services/surfaces/interfaces/display.mojom ('k') | mojo/services/terminal/interfaces/terminal.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698