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

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

Issue 861683003: Move services code brought in from Mojo to live under //third_party. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 module mojo;
6
7 import "geometry/public/interfaces/geometry.mojom";
8 import "gpu/public/interfaces/command_buffer.mojom";
9 import "gpu/public/interfaces/viewport_parameter_listener.mojom";
10 import "surfaces/public/interfaces/quads.mojom";
11 import "surfaces/public/interfaces/surface_id.mojom";
12
13 enum ResourceFormat {
14 RGBA_8888,
15 RGBA_4444,
16 BGRA_8888,
17 ALPHA_8,
18 LUMINANCE_8,
19 RGB_565,
20 ETC1,
21 };
22
23 struct Mailbox {
24 array<int8, 64> name;
25 };
26
27 struct MailboxHolder {
28 Mailbox mailbox;
29 uint32 texture_target;
30 uint32 sync_point;
31 };
32
33 struct TransferableResource {
34 uint32 id;
35 ResourceFormat format;
36 uint32 filter;
37 Size size;
38 MailboxHolder mailbox_holder;
39 bool is_repeated;
40 bool is_software;
41 };
42
43 struct ReturnedResource {
44 uint32 id;
45 uint32 sync_point;
46 int32 count;
47 bool lost;
48 };
49
50 struct Frame {
51 array<TransferableResource> resources;
52 array<Pass> passes;
53 };
54
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);
59 ReturnResources(array<ReturnedResource> resources);
60 };
61
62 [Client=SurfaceClient]
63 interface Surface {
64 CreateSurface(uint32 id_local);
65
66 // The client can only submit frames to surfaces created with this
67 // connection. After the submitted frame is drawn for the first time, the
68 // surface will respond to the SubmitFrame message. Clients should use this
69 // acknowledgement to ratelimit frame submissions.
70 SubmitFrame(uint32 id_local, Frame frame) => ();
71 DestroySurface(uint32 id_local);
72
73 CreateGLES2BoundSurface(CommandBuffer gles2_client,
74 uint32 id_local,
75 Size size,
76 ViewportParameterListener& listener);
77 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698