SurfaceFlinger: fix reference time for transactions

Sometimes the reference time used when applying the transaction
is incorrect as the expected present time calculated in the past
is just before the real vsync. This fix is adding half vsync period
to the previous expected present time to avoid this.

Bug: 170502573
Test: atest FrameRateOverrideHostTest
Change-Id: Ib90238810a2f6a82e04a4375ea347f8e05425775
2 files changed