[SurfaceFlinger] Store current offsets in VSyncModulator.

This way updated offsets are properly persisted to DispSyncSource.

Bug: 135770834
Test: systrace shows correct offsets
Change-Id: I34ed81ebecfa8a4f9826d4a7713da0ec0a8b23de
diff --git a/services/surfaceflinger/Scheduler/VSyncModulator.h b/services/surfaceflinger/Scheduler/VSyncModulator.h
index c6374be..10cf8e6 100644
--- a/services/surfaceflinger/Scheduler/VSyncModulator.h
+++ b/services/surfaceflinger/Scheduler/VSyncModulator.h
@@ -114,8 +114,8 @@
     // Updates offsets and persists them into the scheduler framework.
     void updateOffsets() EXCLUDES(mMutex);
     void updateOffsetsLocked() REQUIRES(mMutex);
-    // Updates the internal offset type.
-    void updateOffsetType() REQUIRES(mMutex);
+    // Updates the internal offsets and offset type.
+    void flushOffsets() REQUIRES(mMutex);
 
     mutable std::mutex mMutex;
     std::unordered_map<OffsetType, Offsets> mOffsetMap GUARDED_BY(mMutex);
@@ -128,7 +128,7 @@
     Scheduler::ConnectionHandle* mAppConnectionHandle = nullptr;
     Scheduler::ConnectionHandle* mSfConnectionHandle = nullptr;
 
-    OffsetType mOffsetType GUARDED_BY(mMutex) = OffsetType::Late;
+    Offsets mOffsets GUARDED_BY(mMutex) = {Scheduler::RefreshRateType::DEFAULT, 0, 0};
 
     std::atomic<Scheduler::TransactionStart> mTransactionStart =
             Scheduler::TransactionStart::NORMAL;