| OLD | NEW |
| 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 "ui/gfx/geometry/mojo/geometry.mojom"; | 12 import "ui/gfx/geometry/mojo/geometry.mojom"; |
| 13 | 13 |
| 14 // This is the main interface that the DisplayCompositor host uses |
| 15 // to connect to the Display Compositor service. |
| 16 interface DisplayCompositorFactory { |
| 17 CreateDisplayCompositor(DisplayCompositor& display_compositor, |
| 18 DisplayCompositorClient display_compositor_client); |
| 19 }; |
| 20 |
| 14 // The DisplayCompositor interface is a privileged interface that allows | 21 // The DisplayCompositor interface is a privileged interface that allows |
| 15 // the display compositor host (browser or window server) to create | 22 // the display compositor host (browser or window server) to create |
| 16 // CompositorFrameSinks. Clients acquire a CompositorFrameSink connection | 23 // CompositorFrameSinks. Clients acquire a CompositorFrameSink connection |
| 17 // through the display compositor host. Clients request a | 24 // through the display compositor host. Clients request a |
| 18 // MojoCompositorFrameSink interface, and implement a | 25 // MojoCompositorFrameSink interface, and implement a |
| 19 // MojoCompositorFrameSinkClient interface. The display compositor host | 26 // MojoCompositorFrameSinkClient interface. The display compositor host |
| 20 // holds one or more root CompositorFrameSinks that are tied to a valid | 27 // holds one or more root CompositorFrameSinks that are tied to a valid |
| 21 // |surface_handle|. All other CompositorFrameSinks are offscreen. FrameSinkIds | 28 // |surface_handle|. All other CompositorFrameSinks are offscreen. FrameSinkIds |
| 22 // are fixed for a given client and are determined ahead of time. Thus, a client | 29 // 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 | 30 // will typically simply request a CompositorFrameSink from the display |
| (...skipping 20 matching lines...) Expand all Loading... |
| 44 // Compositor Host, a stable, and privileged peer service to the display | 51 // Compositor Host, a stable, and privileged peer service to the display |
| 45 // compositor. The display compositor host is either the browser process in | 52 // compositor. The display compositor host is either the browser process in |
| 46 // Chrome or the window server process. | 53 // Chrome or the window server process. |
| 47 interface DisplayCompositorClient { | 54 interface DisplayCompositorClient { |
| 48 // Called by the display compositor immediately upon receiving a | 55 // Called by the display compositor immediately upon receiving a |
| 49 // CompositorFrame with a new SurfaceId for the first time. | 56 // CompositorFrame with a new SurfaceId for the first time. |
| 50 OnSurfaceCreated(cc.mojom.SurfaceId surface_id, | 57 OnSurfaceCreated(cc.mojom.SurfaceId surface_id, |
| 51 gfx.mojom.Size frame_size, | 58 gfx.mojom.Size frame_size, |
| 52 float device_scale_factor); | 59 float device_scale_factor); |
| 53 }; | 60 }; |
| OLD | NEW |