OffscreenCanvas needs to be transitioned to the new display compositor architecture to allow us to move the display compositor to the gpu process.
This roughly captures what I think we need to do. We should stay in sync with the offscreen canvas team to make sure we converge on a good API for both Mus and Offscreen Canvas.
1. Each HTMLCanvasElement should get a unique routing ID and thus FrameSinkId = (client ID, routing ID).
2. OffscreenCanvas should use SurfaceIdAllocator in the renderer and allocate a new LocalFrameId on resize.
3. MojoCompositorFrameSink::SubmitCompositorFrame should change to take in a LocalFrameId. We can make the LocalFrameId optional until we transition to the new API (note that you cannot transmit an invalid LocalFrameId over IPC for security reasons: that ID must be unguessable across IPC boundaries).
4. OffscreenCanvasSurfaceImpl::GetSurfaceId should go away.
5. OffscreenCanvasSurfaceImpl ~= what I've been calling "DisplayCompositor". It provides access to surface references and allocates new SurfaceIds. We should instead use the DisplayCompositor interface for that.
6. Code shared between GpuCompositorFrameSink and OffscreenCanvasCompositorFrameSink should be refactored into cc/surfaces/compositor_frame_sink_support.{h,cc}
Comment 1 by fsam...@chromium.org
, Nov 11 2016