Re-land: De-dupe copy requests for tab capture in DelegatedFrameHost.
Tab capture requests copies/readbacks in response to every delegated
frame swap from the renderer. The requests are moved to, and then
executed on the compositor thread at a later time. Unfortunately, the
browser may not be composited for every render frame, and so multiple
copies/readbacks may become enqueued for the same compositor frame.
This change detects this scenario, and de-dupes by "aborting" the older
frame subscriber callback.
This is a reworking of the first attempt
(https://codereview.chromium.org/
986823002/), which erroneously copied
into the aborted VideoFrame. This resulted in a weird "old frame"
flickering effect because, on slower machines, the VideoFrame had
already been recycled by a buffer pool for a newer copy request.
Rather than manage the queuing/de-duping in DelegatedFrameHost, DFH
simply creates copy requests with a "source" tag. Then, cc::Layer
de-dupes attempts to add multiple requests from the same "source."
BUG=464475,469345
Review URL: https://codereview.chromium.org/
1016273005
Cr-Commit-Position: refs/heads/master@{#323094}