Factoring presentation-time callback buffering out of LayerTreeHostImpl.

When a LayerTreeHostImpl is building a compositor frame, it adopts
presentation-time callbacks registered with the active tree. These
callbacks let users of LayerTreeHostImpl (a.k.a. LayerTreeHost) listen
for timing feedback once a relevant frame swap finishes. Until the frame
swap ocurrs, however, the callbacks need to be buffered.

This change adds a class to handle buffering and retrieving the
presentation-time callbacks.

This is preperatory work to move towards support for callbacks that run
on the compositor thread instead of the renderer main thread.

Bug: 922980
Change-Id: Iaca39ee8ee5b709a74cc24369e896f59ee6dec3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1553915
Commit-Queue: Tom McKee <tommckee@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#663247}
6 files changed