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
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index db75312..7dfa326 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -950,7 +950,7 @@
// Calculates the expected present time for this frame. For negative offsets, performs a
// correction using the predicted vsync for the next frame instead.
- nsecs_t calculateExpectedPresentTime(nsecs_t now) const;
+ nsecs_t calculateExpectedPresentTime(DisplayStatInfo) const;
/*
* Display identification