HWC2: Backpressure missed vsyncs into apps

Adds a mechanism to detect whether the prior frame SurfaceFlinger
presented to hardware composer was actually picked up or not. We then
use this mechanism to avoid pushing two frames in the same vsync.
This backpressure is passed back to applications by not latching any
buffers, which will manifest as dequeueBuffer stalling until
SurfaceFlinger releases a buffer on the following vsync.

Also makes the former INVALIDATE_ON_VSYNC behavior the only behavior
so that this functionality works correctly.

Bug: 29413700
Change-Id: Ibde358e45423ee6fea7b5e09ff65e49c4ad67baa
4 files changed