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

Side by Side Diff: cc/ipc/display_compositor.mojom

Issue 2579693004: GpuCompositorFrameSink implements cc::mojom::DisplayPrivate (Closed)
Patch Set: Addressed comments Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 cc.mojom; 5 module cc.mojom;
6 6
7 import "cc/ipc/frame_sink_id.mojom"; 7 import "cc/ipc/frame_sink_id.mojom";
8 import "cc/ipc/mojo_compositor_frame_sink.mojom"; 8 import "cc/ipc/mojo_compositor_frame_sink.mojom";
9 import "cc/ipc/surface_id.mojom"; 9 import "cc/ipc/surface_id.mojom";
10 import "cc/ipc/surface_sequence.mojom"; 10 import "cc/ipc/surface_sequence.mojom";
11 import "gpu/ipc/common/surface_handle.mojom"; 11 import "gpu/ipc/common/surface_handle.mojom";
12 import "mojo/common/time.mojom";
12 import "ui/gfx/geometry/mojo/geometry.mojom"; 13 import "ui/gfx/geometry/mojo/geometry.mojom";
14 import "ui/gfx/mojo/color_space.mojom";
13 15
14 // The DisplayCompositor interface is a privileged interface that allows 16 // The DisplayCompositor interface is a privileged interface that allows
15 // the display compositor host (browser or window server) to create 17 // the display compositor host (browser or window server) to create
16 // CompositorFrameSinks. Clients acquire a CompositorFrameSink connection 18 // CompositorFrameSinks. Clients acquire a CompositorFrameSink connection
17 // through the display compositor host. Clients request a 19 // through the display compositor host. Clients request a
18 // MojoCompositorFrameSink interface, and implement a 20 // MojoCompositorFrameSink interface, and implement a
19 // MojoCompositorFrameSinkClient interface. The display compositor host 21 // MojoCompositorFrameSinkClient interface. The display compositor host
20 // holds one or more root CompositorFrameSinks that are tied to a valid 22 // holds one or more root CompositorFrameSinks that are tied to a valid
21 // |surface_handle|. All other CompositorFrameSinks are offscreen. FrameSinkIds 23 // |surface_handle|. All other CompositorFrameSinks are offscreen. FrameSinkIds
22 // are fixed for a given client and are determined ahead of time. Thus, a client 24 // are fixed for a given client and are determined ahead of time. Thus, a client
23 // will typically simply request a CompositorFrameSink from the display 25 // will typically simply request a CompositorFrameSink from the display
24 // compositor host which will forward the request to the display compositor. 26 // compositor host which will forward the request to the display compositor.
25 interface DisplayCompositor { 27 interface DisplayCompositor {
26 CreateDisplayCompositorFrameSink( 28 CreateDisplayCompositorFrameSink(
kylechar 2016/12/16 17:15:12 Comments to disambiguate CreateDisplayCompositorFr
Alex Z. 2016/12/19 19:27:47 Done.
27 cc.mojom.FrameSinkId frame_sink_id, 29 cc.mojom.FrameSinkId frame_sink_id,
28 gpu.mojom.SurfaceHandle widget, 30 gpu.mojom.SurfaceHandle widget,
29 cc.mojom.MojoCompositorFrameSink& compositor_frame_sink, 31 cc.mojom.MojoCompositorFrameSink& compositor_frame_sink,
30 cc.mojom.MojoCompositorFrameSinkPrivate& compositor_frame_sink_private, 32 cc.mojom.MojoCompositorFrameSinkPrivate& compositor_frame_sink_private,
31 cc.mojom.MojoCompositorFrameSinkClient compositor_frame_sink_client); 33 cc.mojom.MojoCompositorFrameSinkClient compositor_frame_sink_client,
34 DisplayPrivate& display_private);
32 35
33 CreateOffscreenCompositorFrameSink( 36 CreateOffscreenCompositorFrameSink(
34 cc.mojom.FrameSinkId frame_sink_id, 37 cc.mojom.FrameSinkId frame_sink_id,
35 cc.mojom.MojoCompositorFrameSink& compositor_frame_sink, 38 cc.mojom.MojoCompositorFrameSink& compositor_frame_sink,
36 cc.mojom.MojoCompositorFrameSinkPrivate& compositor_frame_sink_private, 39 cc.mojom.MojoCompositorFrameSinkPrivate& compositor_frame_sink_private,
37 cc.mojom.MojoCompositorFrameSinkClient compositor_frame_sink_client); 40 cc.mojom.MojoCompositorFrameSinkClient compositor_frame_sink_client);
38 }; 41 };
39 42
40 // The DisplayCompositorClient interface is implemented by the Display 43 // The DisplayCompositorClient interface is implemented by the Display
41 // Compositor Host, a stable, and privileged peer service to the display 44 // Compositor Host, a stable, and privileged peer service to the display
42 // compositor. The display compositor host is either the browser process in 45 // compositor. The display compositor host is either the browser process in
43 // Chrome or the window server process. 46 // Chrome or the window server process.
44 interface DisplayCompositorClient { 47 interface DisplayCompositorClient {
45 // Called by the display compostor when it is created. Provides the top level 48 // Called by the display compostor when it is created. Provides the top level
46 // root surface id that should reference display roots. This will always be 49 // root surface id that should reference display roots. This will always be
47 // the first message sent. 50 // the first message sent.
48 OnDisplayCompositorCreated(cc.mojom.SurfaceId root_surface_id); 51 OnDisplayCompositorCreated(cc.mojom.SurfaceId root_surface_id);
49 52
50 // Called by the display compositor immediately upon receiving a 53 // Called by the display compositor immediately upon receiving a
51 // CompositorFrame with a new SurfaceId for the first time. 54 // CompositorFrame with a new SurfaceId for the first time.
52 OnSurfaceCreated(cc.mojom.SurfaceId surface_id, 55 OnSurfaceCreated(cc.mojom.SurfaceId surface_id,
53 gfx.mojom.Size frame_size, 56 gfx.mojom.Size frame_size,
54 float device_scale_factor); 57 float device_scale_factor);
55 }; 58 };
59
60 // The DisplayPrivate is implemented by GpuCompositorFrameSink. It is used so
61 // that ContextFactory can talk to cc::Display without knowing about
62 // cc::Display.
Fady Samuel 2016/12/16 17:18:18 nit: I would not reference GpuCompositorFrameSink
Alex Z. 2016/12/19 19:27:47 Done.
63 interface DisplayPrivate {
kylechar 2016/12/16 17:08:32 Is it DisplayPrivate just to disambiguate it from
64 SetDisplayVisible(bool visible);
65 ResizeDisplay(gfx.mojom.Size size);
sadrul 2016/12/16 17:12:05 Can you add a comment to mention whether |size| is
danakj 2016/12/16 17:13:41 Or name it size_in_dip size_in_physical_pixels or
Alex Z. 2016/12/19 19:27:47 Done.
66 SetDisplayColorSpace(gfx.mojom.ColorSpace color_space);
67 SetOutputIsSecure(bool secure);
68 };
OLDNEW
« no previous file with comments | « no previous file | cc/surfaces/compositor_frame_sink_support.h » ('j') | cc/surfaces/compositor_frame_sink_support.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698