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 blink.mojom; | 5 module blink.mojom; |
6 | 6 |
7 import "cc/ipc/frame_sink_id.mojom"; | 7 import "cc/ipc/frame_sink_id.mojom"; |
8 import "cc/ipc/frame_sink_manager.mojom"; | 8 import "cc/ipc/frame_sink_manager.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_sequence.mojom"; | 12 import "cc/ipc/surface_sequence.mojom"; |
12 | 13 |
13 interface OffscreenCanvasSurface { | 14 interface OffscreenCanvasSurface { |
14 Require(cc.mojom.SurfaceId surface_id, cc.mojom.SurfaceSequence sequence); | 15 Require(cc.mojom.SurfaceId surface_id, cc.mojom.SurfaceSequence sequence); |
15 Satisfy(cc.mojom.SurfaceSequence sequence); | 16 Satisfy(cc.mojom.SurfaceSequence sequence); |
16 }; | 17 }; |
17 | 18 |
| 19 interface OffscreenCanvasSurfaceClient { |
| 20 OnSurfaceCreated(cc.mojom.SurfaceInfo surface_info); |
| 21 }; |
| 22 |
18 // Creates OffscreenCanvasSurface and MojoCompositorFrameSink instances for use | 23 // Creates OffscreenCanvasSurface and MojoCompositorFrameSink instances for use |
19 // with offscreen canvas. | 24 // with offscreen canvas. |
20 interface OffscreenCanvasProvider { | 25 interface OffscreenCanvasProvider { |
21 // TODO(kylechar): Observer interface shouldn't be FrameSinkManagerClient. | |
22 // Create an OffscreenCanvasSurface for |frame_sink_id|. |client| will observe | 26 // Create an OffscreenCanvasSurface for |frame_sink_id|. |client| will observe |
23 // any changes to the SurfaceId associated with |frame_sink_id|. | 27 // any changes to the SurfaceId associated with |frame_sink_id|. |
24 CreateOffscreenCanvasSurface(cc.mojom.FrameSinkId parent_frame_sink_id, | 28 CreateOffscreenCanvasSurface(cc.mojom.FrameSinkId parent_frame_sink_id, |
25 cc.mojom.FrameSinkId frame_sink_id, | 29 cc.mojom.FrameSinkId frame_sink_id, |
26 cc.mojom.FrameSinkManagerClient client, | 30 OffscreenCanvasSurfaceClient client, |
27 OffscreenCanvasSurface& surface); | 31 OffscreenCanvasSurface& surface); |
28 | 32 |
29 // Create an MojoCompositorFrameSink for |frame_sink_id|. This must happen | 33 // Create an MojoCompositorFrameSink for |frame_sink_id|. This must happen |
30 // after creating an OffsreenCanvasSurface for |frame_sink_id|. | 34 // after creating an OffsreenCanvasSurface for |frame_sink_id|. |
31 CreateCompositorFrameSink(cc.mojom.FrameSinkId frame_sink_id, | 35 CreateCompositorFrameSink(cc.mojom.FrameSinkId frame_sink_id, |
32 cc.mojom.MojoCompositorFrameSinkClient client, | 36 cc.mojom.MojoCompositorFrameSinkClient client, |
33 cc.mojom.MojoCompositorFrameSink& sink); | 37 cc.mojom.MojoCompositorFrameSink& sink); |
34 }; | 38 }; |
OLD | NEW |