Revamp OffscreenCanvas commit flow

This patch aims to simplify the existing work flow of OffscreenCanvas commit()
and help OffscreenCanvas transition to the new Display Compositor architecture.
This facilitates the next step of adding resizing functionality of
OffscreenCanvas.

Major changes:
1. OffscreenCanvas now use SurfaceIdAllocator in the renderer/worker, instead
of being in the browser. This is consistent with the new display compositor
architecture.
2. SurfaceLayer for HTMLCanvasElement is only created when Surface is created
in the browser; before that, a dummy SolidColorLayer is put as a placeholder.
3. CanvasSurfaceLayerBridge becomes the client of OffscreenCanvasSurfaceImpl,
so that it can receive IPC messages from browser.
4. FrameSinkId is now generated in renderer/main by CanvasSurfaceLayerBridge,
which remains unchanged throughout the lifecycle of canvas; LocalFrameId is
generated in renderer/worker by OffscreenCanvasFrameDispatcher. At this time it
is only generated once, but will be generated repeatedly when resizing
functionality is added in the future patches.

What is being simplified:
1. Sync IPC GetSurfaceId is removed, reducing overhead in HTMLCanvasElement.
transferControlToOffscreen() API call.
2. When OffscreenCanvas is transferred from main thread to worker thread, there
are now only 2 integers that need to be copied, which constitute the
FrameSinkId. Before this, there were 5 integers that need to be copied. As a
result, there are a lot less attributes that need to be kept by OffscreenCanvas
and CanvasSurfaceLayerBridge.

TBR=avi@chromium.org
BUG=664547, 619138, 662498
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2584643002
Cr-Commit-Position: refs/heads/master@{#439356}
29 files changed