Allow giving TransferableResource as an input for cc.

This lets LayerTreeResourceProvider accept a TransferableResource
in order to generate a ResourceId. Then, when exported as part of
a CompositorFrame, the TransferableResource is forwarded into the
CompositorFrame.

This can replace the use of TextureMailbox for passing resources
into the layer compositor for forwarding through to the display
compositor. Since the layer compositor always forwards resources,
it has no need of any other data format, and can just pass along
the TransferableResource verbatim (with a ResourceId change to
the local ResourceProvider's namespace).

Next steps from here would be to change cc clients to pass a
TransferableResource instead of a TextureMailbox through the
TextureLayer. Then remove all concept of "external" resources
in ResourceProvider, as resources usable by the ResourceProvider
client will always be "internal" in the layer compositor, and
will always be internal or delegated (soon to be always
delegated hopefully) in the display compositor.

R=piman@chromium.org

Bug: 769423
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I3d8674fbd7ab6830f52ba99c5ce4459d0c5241c8
Reviewed-on: https://chromium-review.googlesource.com/691080
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516587}
8 files changed