| 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/compositor_frame.mojom"; | 7 import "cc/ipc/compositor_frame.mojom"; |
| 8 import "cc/ipc/display_compositor.mojom"; | 8 import "cc/ipc/display_compositor.mojom"; |
| 9 import "cc/ipc/frame_sink_id.mojom"; | 9 import "cc/ipc/frame_sink_id.mojom"; |
| 10 import "cc/ipc/mojo_compositor_frame_sink.mojom"; | 10 import "cc/ipc/mojo_compositor_frame_sink.mojom"; |
| 11 import "cc/ipc/surface_id.mojom"; | 11 import "cc/ipc/surface_id.mojom"; |
| 12 import "cc/ipc/surface_sequence.mojom"; | 12 import "cc/ipc/surface_sequence.mojom"; |
| 13 | 13 |
| 14 interface OffscreenCanvasSurface { | 14 interface OffscreenCanvasSurface { |
| 15 Require(cc.mojom.SurfaceId surface_id, cc.mojom.SurfaceSequence sequence); | 15 Require(cc.mojom.SurfaceId surface_id, cc.mojom.SurfaceSequence sequence); |
| 16 Satisfy(cc.mojom.SurfaceSequence sequence); | 16 Satisfy(cc.mojom.SurfaceSequence sequence); |
| 17 }; | 17 }; |
| 18 | 18 |
| 19 interface OffscreenCanvasSurfaceFactory { | 19 // Creates OffscreenCanvasSurface and MojoCompositorFrameSink instances for use |
| 20 // with offscreen canvas. |
| 21 interface OffscreenCanvasProvider { |
| 22 // TODO(kylechar): Observer interface shouldn't be DisplayCompositorClient. |
| 23 // Create an OffscreenCanvasSurface for |frame_sink_id|. |client| will observe |
| 24 // any changes to the SurfaceId associated with |frame_sink_id|. |
| 20 CreateOffscreenCanvasSurface(cc.mojom.FrameSinkId parent_frame_sink_id, | 25 CreateOffscreenCanvasSurface(cc.mojom.FrameSinkId parent_frame_sink_id, |
| 21 cc.mojom.FrameSinkId frame_sink_id, | 26 cc.mojom.FrameSinkId frame_sink_id, |
| 22 cc.mojom.DisplayCompositorClient client, | 27 cc.mojom.DisplayCompositorClient client, |
| 23 OffscreenCanvasSurface& service); | 28 OffscreenCanvasSurface& surface); |
| 24 }; | |
| 25 | 29 |
| 26 interface OffscreenCanvasCompositorFrameSinkProvider { | 30 // Create an MojoCompositorFrameSink for |frame_sink_id|. This must happen |
| 27 // TODO(fsamuel, xlai): Replace this with DisplayCompositor | 31 // after creating an OffsreenCanvasSurface for |frame_sink_id|. |
| 28 CreateCompositorFrameSink(cc.mojom.FrameSinkId frame_sink_id, | 32 CreateCompositorFrameSink(cc.mojom.FrameSinkId frame_sink_id, |
| 29 cc.mojom.MojoCompositorFrameSinkClient client, | 33 cc.mojom.MojoCompositorFrameSinkClient client, |
| 30 cc.mojom.MojoCompositorFrameSink& sink); | 34 cc.mojom.MojoCompositorFrameSink& sink); |
| 31 }; | 35 }; |
| 32 | |
| OLD | NEW |