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 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 int32 count; | 46 int32 count; |
47 bool lost; | 47 bool lost; |
48 }; | 48 }; |
49 | 49 |
50 struct Frame { | 50 struct Frame { |
51 array<TransferableResource> resources; | 51 array<TransferableResource> resources; |
52 array<Pass> passes; | 52 array<Pass> passes; |
53 }; | 53 }; |
54 | 54 |
55 interface SurfaceClient { | 55 interface SurfaceClient { |
| 56 // This sets the id namespace for this connection. This method will be invoked |
| 57 // exactly once when a new connection is established. |
| 58 SetIdNamespace(uint32 id_namespace); |
56 ReturnResources(array<ReturnedResource> resources); | 59 ReturnResources(array<ReturnedResource> resources); |
57 }; | 60 }; |
58 | 61 |
59 [Client=SurfaceClient] | 62 [Client=SurfaceClient] |
60 interface Surface { | 63 interface Surface { |
61 // The id is created by the client and must be unique and contain the | 64 // The id's local field is allocated by the caller and must be unique. The |
62 // connection's namespace in the upper 32 bits. | 65 // id_namespace field on the id may be 0 or this connection's namespace. |
63 CreateSurface(SurfaceId id, Size size); | 66 CreateSurface(SurfaceId id); |
64 | 67 |
65 // The client can only submit frames to surfaces created with this | 68 // The client can only submit frames to surfaces created with this |
66 // connection. After the submitted frame is drawn for the first time, the | 69 // connection. After the submitted frame is drawn for the first time, the |
67 // surface will respond to the SubmitFrame message. Clients should use this | 70 // surface will respond to the SubmitFrame message. Clients should use this |
68 // acknowledgement to ratelimit frame submissions. | 71 // acknowledgement to ratelimit frame submissions. |
69 SubmitFrame(SurfaceId id, Frame frame) => (); | 72 SubmitFrame(SurfaceId id, Frame frame) => (); |
70 DestroySurface(SurfaceId id); | 73 DestroySurface(SurfaceId id); |
71 | 74 |
72 CreateGLES2BoundSurface(CommandBuffer gles2_client, | 75 CreateGLES2BoundSurface(CommandBuffer gles2_client, |
73 SurfaceId id, | 76 SurfaceId id, |
74 Size size, | 77 Size size, |
75 ViewportParameterListener& listener); | 78 ViewportParameterListener& listener); |
76 }; | 79 }; |
OLD | NEW |