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

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

Issue 826423008: Use local ids for Surfaces APIs that can only apply to local surfaces (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months 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 module mojo; 5 module mojo;
6 6
7 import "mojo/services/geometry/public/interfaces/geometry.mojom"; 7 import "mojo/services/geometry/public/interfaces/geometry.mojom";
8 import "mojo/services/gpu/public/interfaces/command_buffer.mojom"; 8 import "mojo/services/gpu/public/interfaces/command_buffer.mojom";
9 import "mojo/services/gpu/public/interfaces/viewport_parameter_listener.mojom"; 9 import "mojo/services/gpu/public/interfaces/viewport_parameter_listener.mojom";
10 import "mojo/services/surfaces/public/interfaces/quads.mojom"; 10 import "mojo/services/surfaces/public/interfaces/quads.mojom";
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 interface SurfaceClient { 55 interface SurfaceClient {
56 // This sets the id namespace for this connection. This method will be invoked 56 // This sets the id namespace for this connection. This method will be invoked
57 // exactly once when a new connection is established. 57 // exactly once when a new connection is established.
58 SetIdNamespace(uint32 id_namespace); 58 SetIdNamespace(uint32 id_namespace);
59 ReturnResources(array<ReturnedResource> resources); 59 ReturnResources(array<ReturnedResource> resources);
60 }; 60 };
61 61
62 [Client=SurfaceClient] 62 [Client=SurfaceClient]
63 interface Surface { 63 interface Surface {
64 // The id's local field is allocated by the caller and must be unique. The 64 CreateSurface(uint32 id_local);
65 // id_namespace field on the id may be 0 or this connection's namespace.
66 CreateSurface(SurfaceId id);
67 65
68 // The client can only submit frames to surfaces created with this 66 // The client can only submit frames to surfaces created with this
69 // connection. After the submitted frame is drawn for the first time, the 67 // connection. After the submitted frame is drawn for the first time, the
70 // surface will respond to the SubmitFrame message. Clients should use this 68 // surface will respond to the SubmitFrame message. Clients should use this
71 // acknowledgement to ratelimit frame submissions. 69 // acknowledgement to ratelimit frame submissions.
72 SubmitFrame(SurfaceId id, Frame frame) => (); 70 SubmitFrame(uint32 id_local, Frame frame) => ();
73 DestroySurface(SurfaceId id); 71 DestroySurface(uint32 id_local);
74 72
75 CreateGLES2BoundSurface(CommandBuffer gles2_client, 73 CreateGLES2BoundSurface(CommandBuffer gles2_client,
76 SurfaceId id, 74 uint32 id_local,
77 Size size, 75 Size size,
78 ViewportParameterListener& listener); 76 ViewportParameterListener& listener);
79 }; 77 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698