Make DrawingBuffer and Canvas2DLayerBridge be cc::TextureLayerClients.
This eliminates the following classes:
- WebExternalTextureMailbox (use cc::TextureMailbox and
cc::SingleReleaseCallback directly now)
- WebExternalTextureLayerClient (use cc::TextureLayerClient directly)
- WebExternalBitmapImpl (use cc::SharedBitmap and friends directly)
While using SingleReleaseCallback, it became clear that some calls to
prepareMailbox were never calling releaseMailbox, causing the texture
to be kept alive forever (and the DrawingBuffer with it), leaking memory.
Fixing this lead to a large rewrite of the "transferToImageBitmap()"
implementation, which hopefully is simpler about its intentions and does
less work switching between mailboxes and SkImages.
R=kbr, piman, xidachen, junov, pdr, tkent
BUG=
606056
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
Committed:
https://crrev.com/b164441d329b1260970621adbe9046ee79917aea
Cr-Commit-Position: refs/heads/master@{#413555}