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

Unified Diff: mojo/services/surfaces/public/interfaces/surfaces.mojom

Issue 807733002: Split surface id and simplify connecting to surfaces service (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: mojo/services/surfaces/public/interfaces/surfaces.mojom
diff --git a/mojo/services/surfaces/public/interfaces/surfaces.mojom b/mojo/services/surfaces/public/interfaces/surfaces.mojom
index 46fb618acc311de1f1e7d63a2df800e0d035a3e0..caaddedef6784aeedfa68f6927089263a55b565d 100644
--- a/mojo/services/surfaces/public/interfaces/surfaces.mojom
+++ b/mojo/services/surfaces/public/interfaces/surfaces.mojom
@@ -53,14 +53,17 @@ struct Frame {
};
interface SurfaceClient {
+ // This sets the id namespace for this connection. This method will be invoked
+ // exactly once when a new connection is established.
+ SetIdNamespace(uint32 id_namespace);
ReturnResources(array<ReturnedResource> resources);
};
[Client=SurfaceClient]
interface Surface {
- // The id is created by the client and must be unique and contain the
- // connection's namespace in the upper 32 bits.
- CreateSurface(SurfaceId id, Size size);
+ // The id's local field is allocated by the caller and must be unique. The
+ // id_namespace field on the id may be 0 or this connection's namespace.
+ CreateSurface(SurfaceId id);
// The client can only submit frames to surfaces created with this
// connection. After the submitted frame is drawn for the first time, the

Powered by Google App Engine
This is Rietveld 408576698