| // Copyright 2016 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module blink.mojom; |
| |
| import "cc/ipc/frame_sink_id.mojom"; |
| import "cc/ipc/frame_sink_manager.mojom"; |
| import "cc/ipc/mojo_compositor_frame_sink.mojom"; |
| import "cc/ipc/surface_id.mojom"; |
| import "cc/ipc/surface_info.mojom"; |
| import "cc/ipc/surface_sequence.mojom"; |
| |
| interface OffscreenCanvasSurface { |
| Require(cc.mojom.SurfaceId surface_id, cc.mojom.SurfaceSequence sequence); |
| Satisfy(cc.mojom.SurfaceSequence sequence); |
| }; |
| |
| interface OffscreenCanvasSurfaceClient { |
| OnSurfaceCreated(cc.mojom.SurfaceInfo surface_info); |
| }; |
| |
| // Creates OffscreenCanvasSurface and MojoCompositorFrameSink instances for use |
| // with offscreen canvas. |
| interface OffscreenCanvasProvider { |
| // Create an OffscreenCanvasSurface for |frame_sink_id|. |client| will observe |
| // any changes to the SurfaceId associated with |frame_sink_id|. |
| CreateOffscreenCanvasSurface(cc.mojom.FrameSinkId parent_frame_sink_id, |
| cc.mojom.FrameSinkId frame_sink_id, |
| OffscreenCanvasSurfaceClient client, |
| OffscreenCanvasSurface& surface); |
| |
| // Create an MojoCompositorFrameSink for |frame_sink_id|. This must happen |
| // after creating an OffsreenCanvasSurface for |frame_sink_id|. |
| CreateCompositorFrameSink(cc.mojom.FrameSinkId frame_sink_id, |
| cc.mojom.MojoCompositorFrameSinkClient client, |
| cc.mojom.MojoCompositorFrameSink& sink); |
| }; |