viz: Ensure surfaces activate before sending OnBeginFrame

Activation of surfaces can trigger DidReceiveCompositorFrameAck.
In order to be able to merge DidReceiveCompositorFrameAck into
OnBeginFrame, we need to make sure the activations always happen before
OnBeginFrame is sent. Therefore, instead of making
SurfaceDependencyDeadline observe the BeginFrameSource directly, let
it be notified by CompositorFrameSinkSupport so that the ordering can
always be guaranteed. This has the added benefit that
PrimaryBeginFrameSource can be removed, greatly simplifying the code.

Bug: 942059,938947
Change-Id: Ia6443c9c579a653500e21619e1e92ec83c7006d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1604497
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Commit-Queue: Saman Sami <samans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659163}
20 files changed