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

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

Issue 2797453002: Rename DisplayCompositor to MojoFrameSinkManager. (Closed)
Patch Set: Rebase. Created 3 years, 8 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 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/local_surface_id.mojom"; 8 import "cc/ipc/local_surface_id.mojom";
9 import "cc/ipc/mojo_compositor_frame_sink.mojom"; 9 import "cc/ipc/mojo_compositor_frame_sink.mojom";
10 import "cc/ipc/surface_id.mojom"; 10 import "cc/ipc/surface_id.mojom";
11 import "cc/ipc/surface_info.mojom"; 11 import "cc/ipc/surface_info.mojom";
12 import "gpu/ipc/common/surface_handle.mojom"; 12 import "gpu/ipc/common/surface_handle.mojom";
13 import "mojo/common/time.mojom"; 13 import "mojo/common/time.mojom";
14 import "ui/gfx/geometry/mojo/geometry.mojom"; 14 import "ui/gfx/geometry/mojo/geometry.mojom";
15 import "ui/gfx/mojo/color_space.mojom"; 15 import "ui/gfx/mojo/color_space.mojom";
16 16
17 // See ui/compositor/compositor.h: ContextFactoryPrivate. 17 // See ui/compositor/compositor.h: ContextFactoryPrivate.
18 // The DisplayPrivate is used by privileged clients to talk to cc::Display. 18 // The DisplayPrivate is used by privileged clients to talk to cc::Display.
19 // DisplayPrivate would eventually replace or be used by ContextFactoryPrivate. 19 // DisplayPrivate would eventually replace or be used by ContextFactoryPrivate.
20 interface DisplayPrivate { 20 interface DisplayPrivate {
21 SetDisplayVisible(bool visible); 21 SetDisplayVisible(bool visible);
22 ResizeDisplay(gfx.mojom.Size size_in_pixel); 22 ResizeDisplay(gfx.mojom.Size size_in_pixel);
23 SetDisplayColorSpace(gfx.mojom.ColorSpace color_space); 23 SetDisplayColorSpace(gfx.mojom.ColorSpace color_space);
24 SetOutputIsSecure(bool secure); 24 SetOutputIsSecure(bool secure);
25 SetLocalSurfaceId(cc.mojom.LocalSurfaceId local_surface_id, 25 SetLocalSurfaceId(cc.mojom.LocalSurfaceId local_surface_id,
26 float scale_factor); 26 float scale_factor);
27 }; 27 };
28 28
29 // The DisplayCompositor interface is a privileged interface that allows 29 // The FrameSinkManager interface is a privileged interface that allows the
30 // the display compositor host (browser or window server) to create 30 // frame sink manager host (browser or window server) to create
31 // CompositorFrameSinks. Clients acquire a CompositorFrameSink connection 31 // CompositorFrameSinks. Clients acquire a CompositorFrameSink connection
32 // through the display compositor host. Clients request a 32 // through the frame sink manager host. Clients request a
33 // MojoCompositorFrameSink interface, and implement a 33 // MojoCompositorFrameSink interface, and implement a
34 // MojoCompositorFrameSinkClient interface. The display compositor host 34 // MojoCompositorFrameSinkClient interface. The frame sink manager host
35 // holds one or more root CompositorFrameSinks that are tied to a valid 35 // holds one or more display CompositorFrameSinks that are tied to a valid
36 // |surface_handle|. All other CompositorFrameSinks are offscreen. FrameSinkIds 36 // |surface_handle| and cc::Display. All other CompositorFrameSinks must be
37 // are fixed for a given client and are determined ahead of time. Thus, a client 37 // parented by another CompositorFrameSink. FrameSinkIds are fixed for a given
38 // will typically simply request a CompositorFrameSink from the display 38 // client and are determined ahead of time. Thus, a client will typically simply
39 // compositor host which will forward the request to the display compositor. 39 // request a CompositorFrameSink from the frame sink manager host which will
40 interface DisplayCompositor { 40 // forward the request to the frame sink manager.
41 interface FrameSinkManager {
41 // Create a CompositorFrameSink for a privileged client (e.g. WindowServer). 42 // Create a CompositorFrameSink for a privileged client (e.g. WindowServer).
42 // This is only used by privileged clients. The client can call methods that 43 // This is only used by privileged clients. The client can call methods that
43 // talks to the Display (e.g. ResizeDisplay(), SetDisplayVisible(), etc) 44 // talks to the Display (e.g. ResizeDisplay(), SetDisplayVisible(), etc)
44 CreateRootCompositorFrameSink( 45 CreateRootCompositorFrameSink(
45 cc.mojom.FrameSinkId frame_sink_id, 46 cc.mojom.FrameSinkId frame_sink_id,
46 gpu.mojom.SurfaceHandle widget, 47 gpu.mojom.SurfaceHandle widget,
47 associated cc.mojom.MojoCompositorFrameSink& compositor_frame_sink, 48 associated cc.mojom.MojoCompositorFrameSink& compositor_frame_sink,
48 cc.mojom.MojoCompositorFrameSinkPrivate& compositor_frame_sink_private, 49 cc.mojom.MojoCompositorFrameSinkPrivate& compositor_frame_sink_private,
49 cc.mojom.MojoCompositorFrameSinkClient compositor_frame_sink_client, 50 cc.mojom.MojoCompositorFrameSinkClient compositor_frame_sink_client,
50 associated DisplayPrivate& display_private); 51 associated DisplayPrivate& display_private);
51 52
52 // CreateCompositorFrameSink is used by unprivileged clients. 53 // CreateCompositorFrameSink is used by unprivileged clients. This
53 // This CompositorFrameSink is not a root, and has to be parented by another 54 // CompositorFrameSink is not a root, and has to be parented by another
54 // CompositorFrameSink in order to appear on screen. 55 // CompositorFrameSink in order to appear on screen.
55 CreateCompositorFrameSink( 56 CreateCompositorFrameSink(
56 cc.mojom.FrameSinkId frame_sink_id, 57 cc.mojom.FrameSinkId frame_sink_id,
57 cc.mojom.MojoCompositorFrameSink& compositor_frame_sink, 58 cc.mojom.MojoCompositorFrameSink& compositor_frame_sink,
58 cc.mojom.MojoCompositorFrameSinkPrivate& compositor_frame_sink_private, 59 cc.mojom.MojoCompositorFrameSinkPrivate& compositor_frame_sink_private,
59 cc.mojom.MojoCompositorFrameSinkClient compositor_frame_sink_client); 60 cc.mojom.MojoCompositorFrameSinkClient compositor_frame_sink_client);
60 61
61 // Set up a BeginFrame relationship between two FrameSinkIds. In this case, 62 // Set up a BeginFrame relationship between two FrameSinkIds. In this case,
62 // the child inherits the BeginFrameSource from the parent if it doesn't 63 // the child inherits the BeginFrameSource from the parent if it doesn't
63 // already have a BeginFrameSource. 64 // already have a BeginFrameSource.
64 RegisterFrameSinkHierarchy(cc.mojom.FrameSinkId parent_frame_sink_id, 65 RegisterFrameSinkHierarchy(cc.mojom.FrameSinkId parent_frame_sink_id,
65 cc.mojom.FrameSinkId child_frame_sink_id); 66 cc.mojom.FrameSinkId child_frame_sink_id);
66 67
67 // Removes a BeginFrame relationship between two FrameSinkIds. 68 // Removes a BeginFrame relationship between two FrameSinkIds.
68 UnregisterFrameSinkHierarchy(cc.mojom.FrameSinkId parent_frame_sink_id, 69 UnregisterFrameSinkHierarchy(cc.mojom.FrameSinkId parent_frame_sink_id,
69 cc.mojom.FrameSinkId child_frame_sink_id); 70 cc.mojom.FrameSinkId child_frame_sink_id);
70 71
71 // Drops the temporary reference for |surface_id|. This will get called when 72 // Drops the temporary reference for |surface_id|. This will get called when
72 // the DisplayCompositorClient doesn't think |surface_id| will be embedded. 73 // the FrameSinkManagerClient doesn't think |surface_id| will be embedded.
73 DropTemporaryReference(cc.mojom.SurfaceId surface_id); 74 DropTemporaryReference(cc.mojom.SurfaceId surface_id);
74 }; 75 };
75 76
76 // The DisplayCompositorClient interface is implemented by the Display 77 // The FrameSinkManagerClient interface is implemented by the Display
77 // Compositor Host, a stable, and privileged peer service to the display 78 // Compositor Host, a stable, and privileged peer service to the display
78 // compositor. The display compositor host is either the browser process in 79 // compositor. The frame sink manager host is either the browser process in
79 // Chrome or the window server process. 80 // Chrome or the window server process.
80 interface DisplayCompositorClient { 81 interface FrameSinkManagerClient {
81 // Called by the display compositor immediately upon receiving a 82 // Called by the frame sink manager immediately upon receiving a
82 // CompositorFrame with a new SurfaceId for the first time. 83 // CompositorFrame with a new SurfaceId for the first time.
83 OnSurfaceCreated(SurfaceInfo surface_info); 84 OnSurfaceCreated(SurfaceInfo surface_info);
84 }; 85 };
OLDNEW
« no previous file with comments | « cc/ipc/display_compositor.mojom ('k') | components/display_compositor/gpu_compositor_frame_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698