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

Side by Side Diff: components/mus/public/interfaces/compositor_frame.mojom

Issue 2019833002: Implement StructTraits for various cc and gpu types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mailbox_name by ref to make windows happy Created 4 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 mus.mojom; 5 module mus.mojom;
6 6
7 import "cc/ipc/returned_resource.mojom";
7 import "components/mus/public/interfaces/quads.mojom"; 8 import "components/mus/public/interfaces/quads.mojom";
8 import "ui/gfx/geometry/mojo/geometry.mojom"; 9 import "ui/gfx/geometry/mojo/geometry.mojom";
9 import "gpu/ipc/common/mailbox_holder.mojom"; 10 import "gpu/ipc/common/mailbox_holder.mojom";
10 import "gpu/ipc/common/sync_token.mojom"; 11 import "gpu/ipc/common/sync_token.mojom";
11 12
12 enum ResourceFormat { 13 enum ResourceFormat {
13 RGBA_8888, 14 RGBA_8888,
14 RGBA_4444, 15 RGBA_4444,
15 BGRA_8888, 16 BGRA_8888,
16 ALPHA_8, 17 ALPHA_8,
17 LUMINANCE_8, 18 LUMINANCE_8,
18 RGB_565, 19 RGB_565,
19 ETC1, 20 ETC1,
20 }; 21 };
21 22
22 // See src/cc/resources/returned_resource.h.
23 struct ReturnedResource {
24 uint32 id;
25 gpu.mojom.SyncToken sync_token;
26 int32 count;
27 bool lost;
28 };
29
30 // A TransferableResource is a graphics resource such as a texture or a bitmap 23 // A TransferableResource is a graphics resource such as a texture or a bitmap
31 // in shared memory (software mode) that is shared between the window server and 24 // in shared memory (software mode) that is shared between the window server and
32 // a client. This data structure is used to manage reuse of 25 // a client. This data structure is used to manage reuse of
33 // the memory once it is no longer needed by the window server and GPU service. 26 // the memory once it is no longer needed by the window server and GPU service.
34 struct TransferableResource { 27 struct TransferableResource {
35 // |id| is an integer that uniquely identifies this resource in the client so 28 // |id| is an integer that uniquely identifies this resource in the client so
36 // that the window server can return this resource back to the client. 29 // that the window server can return this resource back to the client.
37 uint32 id; 30 uint32 id;
38 ResourceFormat format; 31 ResourceFormat format;
39 uint32 filter; 32 uint32 filter;
(...skipping 20 matching lines...) Expand all
60 // separate interface to allow CompositorFrames to be delivered from 53 // separate interface to allow CompositorFrames to be delivered from
61 // supplementary (not main) threads of a mojo app. 54 // supplementary (not main) threads of a mojo app.
62 interface Surface { 55 interface Surface {
63 // After the submitted frame is drawn for the first time, the receiver will 56 // After the submitted frame is drawn for the first time, the receiver will
64 // respond to the SubmitFrame message. Clients should use this acknowledgement 57 // respond to the SubmitFrame message. Clients should use this acknowledgement
65 // to ratelimit frame submissions. 58 // to ratelimit frame submissions.
66 SubmitCompositorFrame(CompositorFrame frame) => (); 59 SubmitCompositorFrame(CompositorFrame frame) => ();
67 }; 60 };
68 61
69 interface SurfaceClient { 62 interface SurfaceClient {
70 ReturnResources(array<ReturnedResource> resources); 63 ReturnResources(array<cc.mojom.ReturnedResource> resources);
71 }; 64 };
OLDNEW
« no previous file with comments | « components/mus/public/cpp/window_surface_client.h ('k') | components/mus/public/interfaces/gpu/display_compositor.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698