SF: clear VsyncTimelines when DisplayMode changes
commit c5d7246dd49845ab5d34fd613213c41007187f96 kept the old
vsync timeline on clearTimestamps to avoid a vsync drift on dVRR,
however when the display mode changes, it actually needs to create
a new vsync timeline.
Fixes: 331272179
Change-Id: Ie1e40ad62d815e41869a4960a6ab21dc6f9c701b
Test: android.graphics.cts.FrameRateOverrideTest
diff --git a/services/surfaceflinger/Scheduler/VSyncPredictor.cpp b/services/surfaceflinger/Scheduler/VSyncPredictor.cpp
index 092bc0d..0b47924 100644
--- a/services/surfaceflinger/Scheduler/VSyncPredictor.cpp
+++ b/services/surfaceflinger/Scheduler/VSyncPredictor.cpp
@@ -427,6 +427,7 @@
mRateMap[idealPeriod()] = {idealPeriod(), 0};
}
+ mTimelines.clear();
clearTimestamps();
}