SF: VSyncTracker, clear timestamps on beginResync
DispSync would clear its internal model around power events, as the
vsync timings during power mode changes are not accurate for screen-on
vsync prediction. DispSync uses the beginResync signal for this, and the
new system does the same (although once DispSync is deprecated,
begin/endResync should go away too).
Fixes: 146050690
Test: Dogfooding blueline
Test: 2 new unit tests
Change-Id: Ie4b607029516dcea0e5d65afca75a7017bf63e12
diff --git a/services/surfaceflinger/tests/unittests/VSyncDispatchRealtimeTest.cpp b/services/surfaceflinger/tests/unittests/VSyncDispatchRealtimeTest.cpp
index 5846c77..9c3d32e 100644
--- a/services/surfaceflinger/tests/unittests/VSyncDispatchRealtimeTest.cpp
+++ b/services/surfaceflinger/tests/unittests/VSyncDispatchRealtimeTest.cpp
@@ -50,6 +50,7 @@
nsecs_t currentPeriod() const final { return mPeriod; }
void setPeriod(nsecs_t) final {}
+ void resetModel() final {}
private:
nsecs_t const mPeriod;
@@ -83,6 +84,7 @@
}
void setPeriod(nsecs_t) final {}
+ void resetModel() final {}
private:
std::mutex mutable mMutex;