viz: Always request presentation timestamp from clients.

Turn on CompositorFrameMetadata.request_presentation_feedback by
default. This would start sending presentation-feedback for every frame
submitted by a client. However, the presentation-feedback is now
included with the begin-frame messages (}, so there is
no longer an extra IPC per frame. There is one extra ipc that gets sent:
when the client submits the last frame, and does not want any more
begin-frames, it still receives a begin-frame carrying the
presentation-timestamp for the last submitted frame.  But the cost of
this is small.

This now requires that submitted CompositorFrame has a valid token.
A viz::FrameTokenGenerator is introduced to facilitate creating the
tokens from the clients. A DCHECK() is also added in the serializer
to catch clients sending a CompositorFrame without a valid token.

After this stays in tree for a few days, a follow up CL will remove the
CompositorFrameMetadata.requested_presentation_feedback flag, and the
associated code.

TBR=fserb@ for third_party/blink changes.
TBR=Bo for android_webview/ changes.
TBR=oshima@ for ash/ and components/exo changes.

Change-Id: I70b9b290cab5a31d6cc7597bd737402f9459c10f
Commit-Queue: Sadrul Chowdhury <>
Reviewed-by: Tom Sepez <>
Reviewed-by: danakj <>
Cr-Commit-Position: refs/heads/master@{#616913}
21 files changed