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

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

Issue 2579693004: GpuCompositorFrameSink implements cc::mojom::DisplayPrivate (Closed)
Patch Set: Rebase 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";
15
16 // See ui/compositor/compositor.h: ContextFactoryPrivate.
17 // The DisplayPrivate is used by privileged clients to talk to cc::Display.
18 // DisplayPrivate would eventually replace or be used by ContextFactoryPrivate.
19 interface DisplayPrivate {
20 SetDisplayVisible(bool visible);
21 ResizeDisplay(gfx.mojom.Size size_in_pixel);
22 SetDisplayColorSpace(gfx.mojom.ColorSpace color_space);
23 SetOutputIsSecure(bool secure);
24 };
13 25
14 // The DisplayCompositor interface is a privileged interface that allows 26 // The DisplayCompositor interface is a privileged interface that allows
15 // the display compositor host (browser or window server) to create 27 // the display compositor host (browser or window server) to create
16 // CompositorFrameSinks. Clients acquire a CompositorFrameSink connection 28 // CompositorFrameSinks. Clients acquire a CompositorFrameSink connection
17 // through the display compositor host. Clients request a 29 // through the display compositor host. Clients request a
18 // MojoCompositorFrameSink interface, and implement a 30 // MojoCompositorFrameSink interface, and implement a
19 // MojoCompositorFrameSinkClient interface. The display compositor host 31 // MojoCompositorFrameSinkClient interface. The display compositor host
20 // holds one or more root CompositorFrameSinks that are tied to a valid 32 // holds one or more root CompositorFrameSinks that are tied to a valid
21 // |surface_handle|. All other CompositorFrameSinks are offscreen. FrameSinkIds 33 // |surface_handle|. All other CompositorFrameSinks are offscreen. FrameSinkIds
22 // are fixed for a given client and are determined ahead of time. Thus, a client 34 // 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 35 // will typically simply request a CompositorFrameSink from the display
24 // compositor host which will forward the request to the display compositor. 36 // compositor host which will forward the request to the display compositor.
25 interface DisplayCompositor { 37 interface DisplayCompositor {
38 // Create a CompositorFrameSink for a privileged client (e.g. WindowServer).
39 // This is only used by privileged clients. The client can call methods that
40 // talks to the cc::Display (e.g. ResizeDisplay(), SetDisplayVisible(), etc)
26 CreateDisplayCompositorFrameSink( 41 CreateDisplayCompositorFrameSink(
27 cc.mojom.FrameSinkId frame_sink_id, 42 cc.mojom.FrameSinkId frame_sink_id,
28 gpu.mojom.SurfaceHandle widget, 43 gpu.mojom.SurfaceHandle widget,
29 cc.mojom.MojoCompositorFrameSink& compositor_frame_sink, 44 cc.mojom.MojoCompositorFrameSink& compositor_frame_sink,
30 cc.mojom.MojoCompositorFrameSinkPrivate& compositor_frame_sink_private, 45 cc.mojom.MojoCompositorFrameSinkPrivate& compositor_frame_sink_private,
31 cc.mojom.MojoCompositorFrameSinkClient compositor_frame_sink_client); 46 cc.mojom.MojoCompositorFrameSinkClient compositor_frame_sink_client,
47 DisplayPrivate& display_private);
32 48
49 // CreateOffscreenCompositorFrameSink is used by non-privileged clients.
Fady Samuel 2016/12/21 18:09:09 nit: unprivileged
Alex Z. 2016/12/21 18:36:14 Done.
50 // An off screen CompositorFrameSink only submits frames to a buffer instead
51 // of a display.
33 CreateOffscreenCompositorFrameSink( 52 CreateOffscreenCompositorFrameSink(
34 cc.mojom.FrameSinkId frame_sink_id, 53 cc.mojom.FrameSinkId frame_sink_id,
35 cc.mojom.MojoCompositorFrameSink& compositor_frame_sink, 54 cc.mojom.MojoCompositorFrameSink& compositor_frame_sink,
36 cc.mojom.MojoCompositorFrameSinkPrivate& compositor_frame_sink_private, 55 cc.mojom.MojoCompositorFrameSinkPrivate& compositor_frame_sink_private,
37 cc.mojom.MojoCompositorFrameSinkClient compositor_frame_sink_client); 56 cc.mojom.MojoCompositorFrameSinkClient compositor_frame_sink_client);
38 }; 57 };
39 58
40 // The DisplayCompositorClient interface is implemented by the Display 59 // The DisplayCompositorClient interface is implemented by the Display
41 // Compositor Host, a stable, and privileged peer service to the display 60 // Compositor Host, a stable, and privileged peer service to the display
42 // compositor. The display compositor host is either the browser process in 61 // compositor. The display compositor host is either the browser process in
43 // Chrome or the window server process. 62 // Chrome or the window server process.
44 interface DisplayCompositorClient { 63 interface DisplayCompositorClient {
45 // Called by the display compostor when it is created. Provides the top level 64 // 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 65 // root surface id that should reference display roots. This will always be
47 // the first message sent. 66 // the first message sent.
48 OnDisplayCompositorCreated(cc.mojom.SurfaceId root_surface_id); 67 OnDisplayCompositorCreated(cc.mojom.SurfaceId root_surface_id);
49 68
50 // Called by the display compositor immediately upon receiving a 69 // Called by the display compositor immediately upon receiving a
51 // CompositorFrame with a new SurfaceId for the first time. 70 // CompositorFrame with a new SurfaceId for the first time.
52 OnSurfaceCreated(cc.mojom.SurfaceId surface_id, 71 OnSurfaceCreated(cc.mojom.SurfaceId surface_id,
53 gfx.mojom.Size frame_size, 72 gfx.mojom.Size frame_size,
54 float device_scale_factor); 73 float device_scale_factor);
55 }; 74 };
OLDNEW
« no previous file with comments | « no previous file | cc/surfaces/compositor_frame_sink_support.h » ('j') | services/ui/ws/frame_generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698