[SurfaceFlinger] correct present time for negative phase offsets
DispSync::expectedPresentTime returns the expected presentation time for
the current frame, but when we're in negative offsets we are targetting
the following frame instead.
Bug: 133241520
Bug: 134589085
Test: systrace when flinging through news
Change-Id: I7cc05a0b9e8e9b5c3e8d0c4b1d59b0a7dabd43d4
diff --git a/services/surfaceflinger/BufferStateLayer.cpp b/services/surfaceflinger/BufferStateLayer.cpp
index 05c721f..203bd72 100644
--- a/services/surfaceflinger/BufferStateLayer.cpp
+++ b/services/surfaceflinger/BufferStateLayer.cpp
@@ -380,7 +380,7 @@
return true;
}
- return mDesiredPresentTime <= mFlinger->mScheduler->expectedPresentTime();
+ return mDesiredPresentTime <= mFlinger->getExpectedPresentTime();
}
nsecs_t BufferStateLayer::getDesiredPresentTime() {