@@ -444,40 +444,8 @@ TEST_F(VSyncPredictorTest, idealModelPredictionsBeforeRegressionModelIsBuilt) {
444444 }
445445}
446446
447- TEST_F (VSyncPredictorTest, doesNotPredictBeforeTimePointWithHigherIntercept_withPredictorRecovery) {
448- SET_FLAG_FOR_TEST (flags::vsync_predictor_recovery, true );
449- std::vector<nsecs_t > const simulatedVsyncs{
450- 158929578733000 ,
451- 158929306806205 , // oldest TS in ringbuffer
452- 158929650879052 ,
453- 158929661969209 ,
454- 158929684198847 ,
455- 158929695268171 ,
456- 158929706370359 ,
457- };
458- auto const idealPeriod = 11111111 ;
459- auto const expectedPeriod = 11079563 ;
460- auto const expectedIntercept = 1335662 ;
461-
462- tracker.setDisplayModePtr (displayMode (idealPeriod));
463- for (auto const & timestamp : simulatedVsyncs) {
464- tracker.addVsyncTimestamp (timestamp);
465- }
466-
467- auto [slope, intercept] = tracker.getVSyncPredictionModel ();
468- EXPECT_THAT (slope, IsCloseTo (expectedPeriod, mMaxRoundingError ));
469- EXPECT_THAT (intercept, IsCloseTo (expectedIntercept, mMaxRoundingError ));
470-
471- // (timePoint - oldestTS) % expectedPeriod works out to be: 894272
472- // (timePoint - oldestTS) / expectedPeriod works out to be: 38.08
473- auto const timePoint = 158929728723871 ;
474- auto const prediction = tracker.nextAnticipatedVSyncTimeFrom (timePoint);
475- EXPECT_THAT (prediction, Ge (timePoint));
476- }
477-
478447// See b/145667109, and comment in prod code under test.
479448TEST_F (VSyncPredictorTest, doesNotPredictBeforeTimePointWithHigherIntercept) {
480- SET_FLAG_FOR_TEST (flags::vsync_predictor_recovery, false );
481449 std::vector<nsecs_t > const simulatedVsyncs{
482450 158929578733000 ,
483451 158929306806205 , // oldest TS in ringbuffer
0 commit comments